You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2019/02/19 09:16:00 UTC

[jira] [Commented] (LUCENE-8565) SimpleQueryParser to support field filtering (aka Add field:text operator)

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

Adrien Grand commented on LUCENE-8565:
--------------------------------------

I like the idea. One thing that I'm wondering is whether some users are going to get caught by surprise if they rely on this limitation to prevent their users from searching other fields than the ones that are configured on the parser (since the default flag enables all operators).

> SimpleQueryParser to support field filtering (aka Add field:text operator)
> --------------------------------------------------------------------------
>
>                 Key: LUCENE-8565
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8565
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/queryparser
>            Reporter: Itamar Syn-Hershko
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> SimpleQueryParser lacks support for the `field:` operator for creating queries which operate on fields other than the default field. Seems likeĀ one can either get the parsed query to operate on a single field, or on ALL defined fields (+ weights). No support for specifying `field:value` in the query.
> It probably wasn't forgotten, but rather left out for simplicity, but since we are using this QP implementation more and more (mostly through Elasticsearch) we thought it would be useful to have it in.
> Seems like this is not too hard to pull off and I'll be happy to contribute a patch for it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org