You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (JIRA)" <ji...@apache.org> on 2017/02/09 12:02:41 UTC

[jira] [Updated] (LUCENE-7684) MemoryIndex should store payloads per-field

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

Alan Woodward updated LUCENE-7684:
----------------------------------
    Attachment: LUCENE-7684.patch

Here is a patch implementing this.  Payloads are detected by checking for a PayloadAttribute when adding a TokenStream to the MemoryIndex.  If terms have already been added with no payload, then an exception is thrown - I think this is a reasonable restriction, as you should generally use the same Analyzer for all values in a multivalued field.

I also needed to make FieldInfo.setStorePayloads() public.

> MemoryIndex should store payloads per-field
> -------------------------------------------
>
>                 Key: LUCENE-7684
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7684
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>         Attachments: LUCENE-7684.patch
>
>
> Currently MemoryIndex will store payloads for all fields, or for none.  It would be useful instead for it to store them per-field.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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