Hi Raj
Maybe this would be what you need.
"Keyword Tokenizer
This tokenizer treats the entire text field as a single token."
There used to be an example showing the use of this in schema.xml, but I am 
away from my computer so it is hard to check.
And everything Emir says is spot-on.
Then you might want to go further with ngrams or a spelling check so the user 
need not be perfect.
Cheers -- Rick

On March 6, 2018 5:40:02 AM EST, "Emir Arnautović" 
<emir.arnauto...@sematext.com> wrote:
>Hi Raj,
>You need to get familiar with Solr analysis chain:
>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.
>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>
>> 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.
>> 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

Sorry for being brief. Alternate email is rickleir at yahoo dot com 

Reply via email to