Sunday, 15 March 2015

Using stemming in a SOLR query -



Using stemming in a SOLR query -

i've set solr, , added document illustration 'collection1'.

<doc> <str name="id">3007wfp</str> <str name="name">fishing</str> <str name="type">ladies</str> </doc>

i can query ok in interface using

name:*fishing*

but stemming work, can e.g. type fish , document due word fishing beingness stemmed. i'd able find ladies when lady searched for.

however have tried query

name:fish

and no results. didn't add together wildcard know match, , want test stemming function.

i've changed schema type of both name , type fields text_en believe includes stemming - restarted solr, , reindexed (clicked optimise).

is there i'm missing or doing wrong, query syntax different when want utilize stemming?

another unusual issue after alter text_general text_en search for

name:fishing

produces no results, though should exact match..

clicking optimize won't re-index documents. merge various segments in existing index, means index still old. 1 time re-post i.e. re-index documents, name:fish should match.

btw, can analyzer doing @ http://localhost:8983/solr/#/collection1/analysis. can take fieldtype , see happens @ index time. example, using tool can see text_en type,

fishing -> fish ladies -> ladi

so search type:lady won't match document. if specify query @ 'field value (query)' highlight matches, if there any.

solr stemming

No comments:

Post a Comment