Page 1 of 1

Does metadata search use Lucene index?

PostPosted:Mon Nov 18, 2019 2:15 pm
by adam.f
I am trying to tune lucene search, but even though I have set WhitespaceAnalyzer, I see differences between search within keywords and metadata.

For example, I am setting the same value in both: "123456789"
searching a substring term "45" in keywords does not return any result (as expected) but searching the same in metadata does.
To be clear, I'm not using any wildcards. Does it mean, that lucene index does not work for metadata or its analyzer is hardcoded?

How to make both to work the same?

Re: Does metadata search use Lucene index?

PostPosted:Mon Nov 18, 2019 7:02 pm
by jllort
All searches go across lucene, metadata included. You should think metadata as standard words. If you have a key 123456, the query might be something like 123* ( you can try with *45* but I'm not 100% sure if will working, in some places the wildcard is not allowed by lucene )

Re: Does metadata search use Lucene index?

PostPosted:Tue Nov 19, 2019 9:21 am
by adam.f
So why it returns data if I search in metadata and does not in keywords? I am not using wildcards and I don't want to find substrings, because I keep some external id in metadata

Re: Does metadata search use Lucene index?

PostPosted:Sat Nov 23, 2019 8:33 am
by jllort
Because by default we add wildcards in searches. Usually, this behaviour is better for almost users. Why? because almost are not interested in how working wildcards and only want to write free text and get the results. Also, are users who want to take more control, seems your case and the search results do not fit exactly your needs. Basically not everybody wants the search engine working in the same manner. In the last version of the professional edition we are working in two new directions ( be able to set for each field is they have or not wildcards by defaults and full customization with external search engine ). Finally, at the end we arrived the concluded that not exist a single search configuration what works fine for all the scenarios is something that must be customized. The current configuration covers the case where users usually are more comfortable ( hight % of the users ) but seem is not your case.

The only option is a small modification of the source code to fit exactly what you need.