Hi Sergio, alas that's not possible that way. If you search for CENTURY BANCORP, INC., then Solr will be totally happy to find all these terms in "NEW CENTURY BANCORP, INC." and return it with a high score.
But you can prepare your data at index time. Make it a multivalued field of type string or text without any tokenization and then permute company names in all reasonable combinations. Since company names should seldom have more than half a dozen words, that might be practicable. You then search with an exact match on that field. Make sure to quote your query parameter correctly, otherwise NEW CENTURY BANCORP, INC. would match CENTURY BANCORP, INC.. -Michael Am 21.09.2018 um 15:00 schrieb marotosg: > Hi, > > I have to search for company names where my first requirement is to find > only exact matches on the company name. > > For instance if I search for "CENTURY BANCORP, INC." I shouldn't find "NEW > CENTURY BANCORP, INC." > because the result company has the extra keyword "NEW". > > I can't use exact match because the sequence of tokens may differ. Basically > I need to find results where the tokens are the same in any order and the > number of tokens match. > > I have no idea if it's possible as include in the query the number of tokens > and solr field has that info within to match it. > > Thanks for your help > Sergio > > > > -- > Sent from: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html >