Fórum

Lucene search articles with boost

Leandro Ezequiel Bravo, modificado 7 Anos atrás.

Lucene search articles with boost

New Member Postagens: 14 Data de Entrada: 15/02/12 Postagens Recentes
Hello,
i have a problem with the recovery of a list of contents. I need to recover all content that have inside the title or the content a keyword.
The requirements are that i need to recover the contents with a boost of 80% for the title and 20% for the content.
I try to get that result with that implementation:
query: (+title:"keyword")^4 OR (+content:"keyword")^1
Sort[] sorts = new Sort[1] ;
sorts[0] = new Sort(DpcContentFields.modified, false);
Hits hits = SearchEngineUtil.search(searchContext.getCompanyId(), searchContext.getGroupIds(), -1 , JournalArticle.class.getName(), query, sorts, -1, -1);
With my implementation the result are not sorted with the boost.
Where is my mistake?

Thanks
thumbnail
Jorge Díaz, modificado 7 Anos atrás.

RE: Lucene search articles with boost

Liferay Master Postagens: 753 Data de Entrada: 09/01/14 Postagens Recentes
Which Liferay version are you using?

Your issue seems to be LPS-38269 that was solved in version 6.2

If you are using a older version try upgrading. If your are using 6.2, it should be solved
Leandro Ezequiel Bravo, modificado 7 Anos atrás.

RE: Lucene search articles with boost

New Member Postagens: 14 Data de Entrada: 15/02/12 Postagens Recentes
Hello Jorge,
Thanks for the response. My Liferay version is the 6.2. I made test about the problem, in conclusion i think that boost works fine, the problem is the sorting of the boosted results. If i remove the sort all the result are boosted but not ordened by modified date that i need.

Thanks


Leandro