Monday 11 June 2012 2:01:29 pm - 2 replies
I want to get autosuggestion for complete title for example, not single words only, like google it does.
In the forum of ngsuggest project from Ivo Lukac ( http://projects.ez.no/ngsuggest/forum/general/complete_title_suggestion ) he wrote:
The main "catch" is that solr is tokenizing the words of all text so to avoid this you should suggest terms form a solr field which is "string" solr type. That string solr type is not tokenized but rather used as a single token
I am new in the solr world and it would be great, if anybody could explain it for me what I have to do.
best regards, scrieler
Monday 11 June 2012 10:45:21 pm
Hi, sorry for not responding on projects site, seems that email notification is not working there.
Anyway, I don't have much time now to explain in details but I can point you to some resources. The main file you need to tackle is:
/extension/ezfind/java/solr/conf/schema.xml ( http://wiki.apache.org/solr/SchemaXml ). The common practice is not to change default configuration but just add the field you need and then use <copyfield> to fill your field with the right data. Later on you can use your field in your tpl/ajax/php code.
Actually I just remembered that I wrote a blog post about ngsuggest
It is almost what you need except you need to tweak "text4suggest" field so it does not tokenize the data to words but rather use the data as one string. I would try to use StrField type without the tokenizer or something like that. You can try and get back if you have any problem.
You must be logged in to post messages in this topic!