I have defined boosting configuration on title property in oak index definition. If the search keyword is “personal loan” and I have got 2 pages with title as “personal loan” and “kids personal loan” then is it right to expect Lucene to show page with title “personal loan” as the first item before the kids page? Is there anyway I can achieve this order ?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
1. boost works with node scoped fulltext query (like contains(., 'income fund commentary')) - the query in your case is looking at fulltext on specific properties
2. the query breaks into (quite a few) union clauses due to OR to UNION optimization - sorting on score for such case doesn't work (OAK-7370 [0] / GRANITE-21031 [1]). Some useful documentation at [2], [3].
For (1), I would recommend modifying the query to do a fulltext query on node instead of each property - basically drop 3_group in query builder query and just put in 'fulltext = income fund commentary'
[0]: https://issues.apache.org/jira/browse/OAK-7370
[1]: https://jira.corp.adobe.com/browse/GRANITE-21031
[3]: http://jackrabbit.apache.org/oak/docs/query/grammar-xpath.html#ordering
Views
Replies
Total Likes
Hi,
1. boost works with node scoped fulltext query (like contains(., 'income fund commentary')) - the query in your case is looking at fulltext on specific properties
2. the query breaks into (quite a few) union clauses due to OR to UNION optimization - sorting on score for such case doesn't work (OAK-7370 [0] / GRANITE-21031 [1]). Some useful documentation at [2], [3].
For (1), I would recommend modifying the query to do a fulltext query on node instead of each property - basically drop 3_group in query builder query and just put in 'fulltext = income fund commentary'
[0]: https://issues.apache.org/jira/browse/OAK-7370
[1]: https://jira.corp.adobe.com/browse/GRANITE-21031
[3]: http://jackrabbit.apache.org/oak/docs/query/grammar-xpath.html#ordering
Views
Replies
Total Likes