Fórum

lucene search

thumbnail
francesco scamarcio, modificado 12 Anos atrás.

lucene search

Regular Member Postagens: 104 Data de Entrada: 17/08/09 Postagens Recentes
I am implementing a class to do a search with lucene. I have to search content by tag, but if the label is formed by more than one word, the query did not seek anything.

Example if i have to search a content that has a tags like 'more result'

BooleanQuery.addTerm("assetTags","more result") returns assetTag:more assetTags:result)

how can i do to search the whole word?
thumbnail
David H Nebinger, modificado 12 Anos atrás.

RE: lucene search

Liferay Legend Postagens: 14918 Data de Entrada: 02/09/06 Postagens Recentes
thumbnail
Hitoshi Ozawa, modificado 12 Anos atrás.

RE: lucene search

Liferay Legend Postagens: 7942 Data de Entrada: 24/03/10 Postagens Recentes
Check the following page:
http://lucene.apache.org/core/old_versioned_docs/versions/3_0_1/api/all/org/apache/lucene/queryParser/QueryParser.html

Lucene's default QueryParser.Operator is OR, you'll have to add code to specify it to AND

Before parsing in portal-impl\src\com\liferay\portlet\search\lucene\LuceneHelperImpl.java