index-rule boost config in indexing_configuration.xml

53 views
Skip to first unread message

Wojciech Oledzki

unread,
Oct 20, 2017, 4:37:28 AM10/20/17
to Hippo Community
Hi,

I'm trying to tune jackrabbit lucene index by only indexing fields we want to be searchable, and set importance (boost) of each field.

    <index-rule nodeType="mynamespace:mydocument">
        <property boost="5">mynamespace:Title</property>
        <property boost="2">mynamespace:Summary</property>
        <property boost="0.5">mynamespace:KeyFacts</property>
        <!--
        This is to allow us to search using these fields.
        -->
        <property boost="0.5">hippostd:state</property>
    </index-rule>

This takes care of making only these fields searchable, but the "jcr:score" is always the same for all documents.

Is there any other HippoCMS-way to set/configure the importance of each field - I'm aware of the search query "hack" https://www.onehippo.org/library/concepts/search/boost-document-scores-for-hits-in-some-property.html but I want to define/control it independently of search component(s)

Thanks,
Wojtek

Wojciech Oledzki

unread,
Oct 24, 2017, 5:01:07 AM10/24/17
to Hippo Community
I got a bit further, but still the "boost" is not working.

<!DOCTYPE configuration SYSTEM "http://jackrabbit.apache.org/dtd/indexing-configuration-1.1.dtd">
...
    <index-rule
        nodeType="mymodule:mydocument"
        boost="2.0"
    >
        <property boost="5.0">mymodule:Title</property>
        <property boost="2.0">mymodule:Summary</property>
        <property boost="1.0">mymodule:KeyFacts</property>
        <property boost="1.0" isRegexp="true" nodeScopeIndex="false">.*:.*</property>
    </index-rule>

This takes care of only indexing Title, Summary and KeyFacts, and the rest of fields is not added to "Node Scope Index".

But still, the jackrabbit "boost" is ignored when calculating jcr:score.

Any advice?

Thanks.

Marijan Milicevic

unread,
Oct 24, 2017, 5:16:18 AM10/24/17
to hippo-c...@googlegroups.com
how did you configure your configuration?
cheers
marijan 

Thanks.

Voytek Solutions Ltd is a company registered in England and Wales.
Registered number: 9449603, VAT number: 206143743,
Registered office: First Floor, Telecom House, 125-135 Preston Road, Brighton BN1 6AF

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.

Wojciech Oledzki

unread,
Oct 24, 2017, 6:45:35 AM10/24/17
to Hippo Community
How do you mean "configuration"?

* hst:configutation for my modul - I'm not aware of any config for indexing I can put there. If there is, please let me know what is it :)
* indexing_configuration.xml is loaded from repository.xml <param name="indexingConfiguration" value="file://${catalina.base}/conf/query/lucene/indexing_configuration.xml"/>. The file itself extends the built in file from "hippo-repository"

Thanks.
To post to this group, send email to hippo-c...@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.

Marijan Milicevic

unread,
Oct 24, 2017, 7:33:56 AM10/24/17
to hippo-c...@googlegroups.com
On Tue, Oct 24, 2017 at 12:45 PM, Wojciech Oledzki <woj...@voytek.solutions> wrote:
How do you mean "configuration"?

* hst:configutation for my modul - I'm not aware of any config for indexing I can put there. If there is, please let me know what is it :)
* indexing_configuration.xml is loaded from repository.xml <param name="indexingConfiguration" value="file://${catalina.base}/conf/query/lucene/indexing_configuration.xml"/>. The file itself extends the built in file from "hippo-repository"


this is repository part and should be configured in there (it has nothing to do with hst(configuration)),
I was asking because it might be configuration is not picked up at all (as in: maybe default configuration is still being used),
I am also assuming you are doing full re-indexing after index file changes
/m

 
To post to this group, send email to hippo-community@googlegroups.com

RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.

Wojciech Oledzki

unread,
Oct 24, 2017, 8:20:05 AM10/24/17
to Hippo Community
File is loading - I can break hippo with a typo or missing namespace in that file :D

I have my test content (yaml) that is bootstrapping on a clean storage (mvn clean verify...)

Any help from anyone who did similar thing would be much appreciated.

Thanks
Reply all
Reply to author
Forward
0 new messages