[
https://issues.apache.org/jira/browse/LUCENE-5251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784977#comment-13784977
]
Michael McCandless commented on LUCENE-5251:
--------------------------------------------
bq. The patch does not duplicate the files but shows two git commits on the new
files.
OK, got it. That's cool; it's nice to see the separate revisions
spelled out. I just wish "patch" or "svn patch" did the right thing
here...
Thank you for merging commits on the new patch :)
{quote}
I am aware of that problem and was thinking along the same lines, have ONLY
TermFreqPayloadIterator (maybe should be named something like EntryIterator? as
there will be no TermFreqIterator and co) and have it accepted for all the
suggester and let the suggester throw exceptions if it does not support
payload/weight. I would be happy to open up an issue and work on it!
{quote}
That would be awesome! I agree we should do this separately... for
this issue I think we just document that it works only with the
"newer" suggesters?
New patch looks great, thanks Areek! Some comments:
* For the "field", I think we should use .stringValue() not
.binaryValue()? Ie, an app would typically have stored a
StringField? (But for payloadField, I think it should be
.binaryValue()).
* If the payload field exists, but its .binaryValue() is null, I
think we should throw an IAE too?
* Maybe use RandomIndexWriter in the tests? (It's more evil.) The
only issue is, you should then also set a .newLogMergePolicy()
onto those IndexWriterConfigs, else eventually you'll get the
AlcoholicMergePolicy and the docIDs will be in a different order
than how you indexed and the test will [falsely] fail.
> New Dictionary Implementation for Suggester consumption
> -------------------------------------------------------
>
> Key: LUCENE-5251
> URL: https://issues.apache.org/jira/browse/LUCENE-5251
> Project: Lucene - Core
> Issue Type: New Feature
> Components: core/search
> Reporter: Areek Zillur
> Attachments: LUCENE-5251.patch, LUCENE-5251.patch
>
>
> With the vast array of new suggester, It would be nice to have a dictionary
> implementation that could feed the suggesters terms, weights and (optionally)
> payloads from the lucene index.
> The idea of this dictionary implementation is to grab stored documents from
> the index and use user-configured fields for terms, weights and payloads.
> use-case: If you have a document with three fields
> - product_id
> - product_name
> - product_popularity_score
> then using this implementation would enable you to have a suggester for
> product_name using the weight of product_popularity_score and return you the
> payload of product_id, with which you can do further processing on (example:
> construct a url etc).
--
This message was sent by Atlassian JIRA
(v6.1#6144)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]