lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Allistair Crossley <>
Subject Re: Any way to "append" new text to an existing indexed field?
Date Fri, 01 Oct 2010 11:46:50 GMT
i would say question and answer are 2 different entities. if you are using the data import
handler, i would personally create them as separate entities with their own queries to the
database using the deltaQuery method to pick up only new rows. i guess it depends if you need
question + answers to actually come back out to be used for display (i.e. you stored their
data), or whether it's good enough to match on question/answer separately and then just link
to a question ID in your UI to drill-down from the database.

disclaimer: i am a solr novice - just started, so i'd see what others think too ;)

On Oct 1, 2010, at 7:38 AM, Andy wrote:

> I'm building a Q&A application. There's a "Question" database table and an "Answer"
> For each question, I'm putting the question itself plus all the answers into a single
field "text" to be indexed and searched.
> Say I have a question that has 10 existing answers that are already indexed. If a new
answer is submitted for that question, is there any way I could just "append" the new answer
to the "text" field? Or is the only way to implement this is to retrieve the original question
and the 10 existing answers from the database, combine them with the newly submitted 11th
answer, and re-index everything from scratch?
> The latter option just seems inefficient. Is there a better design that could be used
for this use case?
> Andy

View raw message