Hi,

I recently read about payloads in the Apache Solr 4 Cookbook and would like
to know if this is the
right solution for my problem or if other methods are more suitable.

Generally, I need to perform fulltext search in a field (including
highlighting) where I need metadata per token in the search result, but I do
not need to search in that metadata.

I have documents containing data (not natural language), where each data
entry contains multiple metadata informations. An example with a sentence
and as XML-like structure could be
<meta attr1="val11" attr2="val2" attr3="val3">This</meta>
<meta attr1="val13" attr2="val7" attr3="val3">is</meta>
<meta attr1="val16" attr2="val22" attr3="val3">one</meta>
<meta attr1="val14" attr2="val2" attr3="val3">sentence.</meta>
Additionaly there exist some fields per document that i need for faceting
etc. (id, category, timestamp etc.)

When searching, I want to search only in "This is one sentence.", a search
for "attr1" or "val3" should give no results. However, when searching for
"one" in the search response I need to know attr1="val16" attr2="val22" and
attr3="val3".

My first intuition when creating the schema was to create a multiValue field
"content" containing each word in the document. Then I add attr1, attr2 and
attr3 as payload to each word/token.
Is this the right way to use payloads? Or is there a better solution for
such a task?
I imagine this to be a common use case: searching in a "cleaned" version of
the data and returning the original one.

Could anyone please provide suggestions on how to tackle such a task? The
book and the Solr wiki pages
did not lead me to anything that I could immediately identify as a solution
to my problem.

If the proposed solution depends on the data: each document might have 3-8
additional attributes, and there might be between 100-10000 tokens per
document. 

Regards



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Is-payload-the-right-solution-for-my-problem-tp4063814.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to