You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2014/12/09 15:27:12 UTC

[jira] [Commented] (OAK-2329) Use LuceneQuery parser to create query from fulltext string

    [ https://issues.apache.org/jira/browse/OAK-2329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14239456#comment-14239456 ] 

Chetan Mehrotra commented on OAK-2329:
--------------------------------------

The implementation needs to support

# http://www.day.com/specs/jcr/1.0/6.6.5.2_jcr_contains_Function.html
# Query time boosting of terms - Though not part of #1 above but it seems the implicit usage of Lucene's QueryParser allowed people to use query time boosting via \^ operator [1]. And it looks useful so would be better to support
# Wildcard searches

#2 and #3 rule out SimpleQueryParser. So probably better to stick with classic QueryParser

[1] http://helpx.adobe.com/experience-manager/kb/BoostInSearch.html

> Use LuceneQuery parser to create query from fulltext string
> -----------------------------------------------------------
>
>                 Key: OAK-2329
>                 URL: https://issues.apache.org/jira/browse/OAK-2329
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: oak-lucene
>            Reporter: Chetan Mehrotra
>            Assignee: Chetan Mehrotra
>             Fix For: 1.2
>
>
> Currently the Oak QueryEngine parses the fulltext expression and
> produces the FulltextExpression. This was required for runtime
> aggregation to work. This allowe [d the LuceneIndex to just convert
> the given text (in FulltextTerm) to corresponding Lucene Query [1].
> Note that JCR contract for fulltext clause [2] supports some grammer
> which was so far handled by the Oak QueryEngine.
> Now when moving to index time aggregation it was realized that such parsing of fulltext expression is problamatic [3] in presence of
> different analyzers. As we fix that we need also support the
> requirements mentioned in [2]. JR2 used to do that via Lucene
> QueryParser [4].
> As a fix {{LucenePropertyIndex}} should use a Lucene QueryParser to construct the query. 
> Now need to determine which parser to use [5] :). [SimpleQueryParser|https://issues.apache.org/jira/browse/LUCENE-5336] looks useful!
> [1] https://github.com/apache/jackrabbit-oak/blob/trunk/oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LucenePropertyIndex.java#L913
> [2] http://www.day.com/specs/jcr/1.0/6.6.5.2_jcr_contains_Function.html
> [3] https://issues.apache.org/jira/browse/OAK-2301
> [4] https://github.com/apache/jackrabbit/blob/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/JackrabbitQueryParser.java
> [5] https://lucene.apache.org/core/4_7_0/queryparser/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)