[Yanel-dev] [Yarep Search] Lucene implementation flaw re searching a particular property
Michael Wechner
michael.wechner at wyona.com
Thu Mar 17 16:48:39 CET 2011
Hi
I just noticed that the Lucene implementation:
src/impl/java/org/wyona/yarep/impl/search/lucene/LuceneSearcher.java#searchProperty(String,
String, String)
does also use the Lucene QueryParser, which means one can do searches
like for example
String queryText = "workflow-state:" + workflowState + " AND " +
"yarep_mimeType:" + "application/news+xml"
getRealm().getRepository().getSearcher().searchProperty("workflow-state", queryText,
"/");
because the queryText is parsed by the QueryParser and the field
"workflow-state" is only
used as default field, but has no relevance for the QueryParser if a
queryText is specified as above.
This might be a nice workaround, but is not intended, but one should
actually only be able to
search one property.
I hope nobody relies on this flaw, because I think we should fix it and
rather offer an improved query API.
Cheers
Michael
More information about the Yanel-development
mailing list