Foros de discusión

lucene search

thumbnail
francesco scamarcio, modificado hace 12 años.

lucene search

Regular Member Mensajes: 104 Fecha de incorporación: 17/08/09 Mensajes recientes
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 hace 12 años.

RE: lucene search

Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
thumbnail
Hitoshi Ozawa, modificado hace 12 años.

RE: lucene search

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
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