Hi Raj, You need to get familiar with Solr analysis chain: https://lucene.apache.org/solr/guide/6_6/understanding-analyzers-tokenizers-and-filters.html <https://lucene.apache.org/solr/guide/6_6/understanding-analyzers-tokenizers-and-filters.html>
When playing with it, use admin console analysis tab to see what tokens are produced. And you need to understand your search requirements and cover them with one or more fields. Note that you can use copyField to index the same content in different ways to handle different search requirements. It is probably not what you want, but based on what you described, you do not care about anything but the first token in your field, so you can use LimitTokenCountFilter to index only the first token. In query analysis you do not use it and with default operator OR you will get what you want. HTH, Emir -- Monitoring - Log Management - Alerting - Anomaly Detection Solr & Elasticsearch Consulting Support Training - http://sematext.com/ > On 6 Mar 2018, at 10:55, Rajvinder Pal <rajvinder....@gmail.com> wrote: > > Hi , > I am new to Lucene. I have a requirement where when i request the > organization name, it should show the matching organization names. > > I have written the q param as > > orgname_text: ABC test > > it is returning the result :- > > ABC test limited > ABC XYZ limited > DEF ABC limted > test limited > > I want all the matching result which starts with either ABC or test. so > here i dont want DEF ABC limited. Please let me know what feature or > syntax i should use to get the required result. > > Thanks > Raj