The way folks have addressed this situation to date is to model the 
"multivalued fields" as additional documents too.


On Aug 26, 2011, at 09:32 , <dar...@ontrenet.com> <dar...@ontrenet.com> wrote:

> 
> Many thanks Erick.
> 
> I think a good feature to add to Solr to address this is
> to allow a query to return either the "document" as a result
> or the matching (multivalued) fields of a document as individual results
> (subject to paging too).
> Because sometimes the field value (only) is the desired result list.
> 
> Since Solr already touches the index for the field match and paging,
> all the logic is already there to return only the field results (and some
> document metadata perhaps).
> 
> I will ponder a way to do this with a query handler maybe.
> 
> On Fri, 26 Aug 2011 09:09:06 -0400, Erick Erickson
> <erickerick...@gmail.com> wrote:
>> OK, I think I have it.
>> 
>> It's a problem, indeed. And no, there's no way I know of to
>> make a doc fetch only bring back some range of values in
>> a multivalued field.
>> 
>> So you're stuck with either getting the whole book back
>> and peeling out the pages (how do you know which
>> sentences are on which page anyway?) or breaking
>> your book up somehow, say on a chapter or page basis
>> to reduce what's returned. You could possibly group
>> the results by book if you broke it up..
>> 
>> BTW, you can match within sentences by appropriate
>> proximity searches combined with an incrementgap.
>> 
>> Best
>> Erick
>> 
>> On Thu, Aug 25, 2011 at 10:01 PM, Darren Govoni <dar...@ontrenet.com>
>> wrote:
>>> Hi Erick,
>>>   Sure thing.
>>> 
>>> I have a document schema where I put the sentences of that document in
> a
>>> multivalued field "sentences".
>>> I search that field in a query but get back the document results,
>>> naturally.
>>> 
>>> I then need to further find which exact sentences matched the query
> (for
>>> each document result)
>>> and then do my own paging since I am only returning pages of sentences
>>> and
>>> not the whole document.
>>> (i.e. I don't want to page the document results).
>>> 
>>> Does this make sense? Or is there a better way Solr can accomodate
> this?
>>> 
>>> Much appreciated.
>>> 
>>> Darren
>>> 
>>> On 08/25/2011 07:24 PM, Erick Erickson wrote:
>>>> 
>>>> Hmm, I don't quite understand what you want. An example
>>>> or two would help.
>>>> 
>>>> Best
>>>> Erick
>>>> 
>>>> On Thu, Aug 25, 2011 at 12:11 PM, Darren Govoni<dar...@ontrenet.com>
>>>>  wrote:
>>>>> 
>>>>> Hi,
>>>>>  Is it possible to construct a query in Solr where the paged results
>>>>> are
>>>>> matching multivalued fields and not documents?
>>>>> 
>>>>> thanks,
>>>>> Darren
>>>>> 
>>> 
>>> 

Reply via email to