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 2015/06/08 17:53:00 UTC

[jira] [Updated] (LUCENE-6531) Make PhraseQuery immutable

     [ https://issues.apache.org/jira/browse/LUCENE-6531?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrien Grand updated LUCENE-6531:
---------------------------------
    Attachment: LUCENE-6531.patch

Here is a patch. PhraseQuery has a main constructor: PhraseQuery(int slop, String field, List<TermAndPosition> termsAndPositions) and some sugar constructors such as PhraseQuery(String field, String... terms) that will search for terms at consecutive positions in {{field}} with a slop of 0.

> Make PhraseQuery immutable
> --------------------------
>
>                 Key: LUCENE-6531
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6531
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: 6.0
>
>         Attachments: LUCENE-6531.patch
>
>
> Mutable queries are an issue for automatic filter caching since modifying a query after it has been put into the cache will corrupt the cache. We should make all queries immutable (up to the boost) to avoid this issue.



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

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