[
https://issues.apache.org/jira/browse/LUCENE-7340?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Smiley updated LUCENE-7340:
---------------------------------
Attachment: LUCENE-7340.patch
I tweaked your patch a bit, including modifying the output a little. I think
it's no value to count the number of payloads so I removed that; do you
disagree? I added a dedicated toString() test.
What I really don't like about MemoryIndex.toString() is that it isn't generic
when it so obviously could be. Why have MemoryIndex specific logic that needs
to be maintained (it broke here causing this bug) when there might be a
Terms.toString() or at least a utility method on Terms (or Fields?) that a
better MemoryIndex might call? I'm filing a separate issue for that.
> MemoryIndex.toString is broken if you enable payloads
> -----------------------------------------------------
>
> Key: LUCENE-7340
> URL: https://issues.apache.org/jira/browse/LUCENE-7340
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/highlighter
> Affects Versions: 5.4.1, 6.0.1, master (7.0)
> Reporter: Daniel Collins
> Assignee: David Smiley
> Priority: Minor
> Attachments: LUCENE-7340.diff, LUCENE-7340.diff, LUCENE-7340.patch
>
>
> Noticed this as we use Luwak which creates a MemoryIndex(true, true) storing
> both offsets and payloads (though in reality we never put any payloads in it).
> We used to use MemoryIndex.toString() for debugging and noticed it broke in
> Lucene 5.x and beyond. I think LUCENE-6155 broke it when it added support
> for payloads?
> Creating default memoryindex (as all the tests currently do) works fine, as
> does one with just offsets, it is just the payload version which is broken.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]