[
https://issues.apache.org/jira/browse/LUCENE-5251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13784013#comment-13784013
]
Michael McCandless commented on LUCENE-5251:
--------------------------------------------
This is a great idea!
Hmm, the patch duplicates files, i.e. DocumentDictionary.java and
DocumentDictionaryTest.java appear twice; looks like git included some extra
local revisions or something?
Unfortunately, the older suggesters do an instanceof check for
TermFreqPayloadIterator and refuse to build() if so, since they don't support
payloads, which means they can't be used w// DocumentDictionary? Maybe we
should fix those to instead fail if payload() is ever non-null; and maybe we
should nuke the separate iterator and just add payload() to TermFreqIterator?
(We can do all this separately...).
Maybe you should pull the payload from StorableField.binaryValue() instead of
new BytesRef(StorableField.stringValue())? Maybe javadoc that all fields are
required (cannot be sparse) for every document.
You already check that weight cannot be null, so you don't need the extra null
check after that?
> 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
>
>
> 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]