Does metadata search use Lucene index?

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
adam.f
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Mon Nov 18, 2019 1:17 pm

Does metadata search use Lucene index?

Post by adam.f » Mon Nov 18, 2019 2:15 pm

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?

jllort
Moderator
Moderator
Posts: 10934
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Does metadata search use Lucene index?

Post by jllort » Mon Nov 18, 2019 7:02 pm

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 )

adam.f
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: Mon Nov 18, 2019 1:17 pm

Re: Does metadata search use Lucene index?

Post by adam.f » Tue Nov 19, 2019 9:21 am

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

jllort
Moderator
Moderator
Posts: 10934
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Does metadata search use Lucene index?

Post by jllort » Sat Nov 23, 2019 8:33 am

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.

Post Reply