I am using Solr 4.10.2. I have build indexed documents. In Schema.xml, I have removed ID field and replaced it with ngram field and made ngram field as unique key.
I have a question - when I will do search query on Solr. Will the performance of searching harm? And also it will affect Document caching.
Best How To :
Using ngram field as a unique key is a very bad idea. The unique key field must not be a "tokenized" type otherwise multiple individual tokens comprise a key which will lead to false positive matches. You should use a string or an int/long field type only as the type of a unique key.
Of course, performance is also affected somewhat because ngram fields create many tokens instead of one, but that'd be negligible compared to the other problems such as false positives and duplicate documents.