Re: Return only matched multiValued field

2012-09-24 Thread Mikhail Khludnev
Hi
It seems like highlighting feature.
24.09.2012 0:51 пользователь Dotan Cohen dotanco...@gmail.com написал:

 Assuming a multivalued, stored and indexed field with name comment.
 When performing a search, I would like to return only the values of
 comment which contain the match. For example:

 When searching for gold instead of getting this result:

 doc
 arr name=comment
 strTheres a lady whos sure/str
 strall that glitters is gold/str
 strand shes buying a stairway to heaven/str
 /arr
 /doc

 I would prefer to get this result:

 doc
 arr name=comment
 strall that glitters is gold/str
 /arr
 /doc

 (psuedo-XML from memory, may not be accurate but illustrates the point)

 Is there any way to do this with a Solr 4 index? The client accessing
 Solr is on a dial-up connection (no provision for DSL or other high
 speed internet) so I'd like to move as little data over the wire as
 possible. In reality, the array will have tens of fields so returning
 only the relevant fields may reduce the data transferred by an order
 of magnitude.

 Thanks.

 --
 Dotan Cohen

 http://gibberish.co.il
 http://what-is-what.com



Re: Return only matched multiValued field

2012-09-24 Thread Dotan Cohen
 field name=doctest type=textmulti stored=true 
 indexed=true
 multiValued=true /
 /fields
 defaultSearchFielddoctest/defaultSearchField

Note that in anonymizing the information, I introduced a typo. The
above doctest should be doctext. In any case, the field names in
the production application and in production schema do in fact match!


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com


Re: Return only matched multiValued field

2012-09-24 Thread Erick Erickson
Hmmm, works for me. What is your entire response packet?

And you've covered the bases with indexed and stored so this
seems like it _should_ work.

Best
Erick

On Mon, Sep 24, 2012 at 6:12 AM, Dotan Cohen dotanco...@gmail.com wrote:
 field name=doctest type=textmulti stored=true 
 indexed=true
 multiValued=true /
 /fields
 defaultSearchFielddoctest/defaultSearchField

 Note that in anonymizing the information, I introduced a typo. The
 above doctest should be doctext. In any case, the field names in
 the production application and in production schema do in fact match!


 --
 Dotan Cohen

 http://gibberish.co.il
 http://what-is-what.com


Re: Return only matched multiValued field

2012-09-24 Thread Dotan Cohen
On Mon, Sep 24, 2012 at 2:16 PM, Erick Erickson erickerick...@gmail.com wrote:
 Hmmm, works for me. What is your entire response packet?

 And you've covered the bases with indexed and stored so this
 seems like it _should_ work.


I'm sorry, reducing the output to rows=1 helped me notice that the
highlighted sections come after the main results. The highlighting
feature works as expected.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com


Re: Return only matched multiValued field

2012-09-24 Thread Dotan Cohen
On Mon, Sep 24, 2012 at 9:47 AM, Mikhail Khludnev
mkhlud...@griddynamics.com wrote:
 Hi
 It seems like highlighting feature.

Thank you Mikhail. I actually do need the entire matched single entry,
not a snippet of it. Looking at the example in the OP, with
highlighting on gold I would get

emglitters is gold/em

Whereas I need:
strall that glitters is gold/str

Thanks.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com


Return only matched multiValued field

2012-09-23 Thread Dotan Cohen
Assuming a multivalued, stored and indexed field with name comment.
When performing a search, I would like to return only the values of
comment which contain the match. For example:

When searching for gold instead of getting this result:

doc
arr name=comment
strTheres a lady whos sure/str
strall that glitters is gold/str
strand shes buying a stairway to heaven/str
/arr
/doc

I would prefer to get this result:

doc
arr name=comment
strall that glitters is gold/str
/arr
/doc

(psuedo-XML from memory, may not be accurate but illustrates the point)

Is there any way to do this with a Solr 4 index? The client accessing
Solr is on a dial-up connection (no provision for DSL or other high
speed internet) so I'd like to move as little data over the wire as
possible. In reality, the array will have tens of fields so returning
only the relevant fields may reduce the data transferred by an order
of magnitude.

Thanks.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com


Return only matched multiValued field

2012-09-11 Thread Dotan Cohen
Assuming a multivalued, stored and indexed field with name comment.
When performing a search, I would like to return only the values of
comment which contain the match. For example:

When searching for gold instead of getting this result:
doc
arr name=comment
strTheres a lady whos sure/str
strall that glitters is gold/str
strand shes buying a stairway to heaven/str
/arr
/doc

I would prefer to get this result:
doc
arr name=comment
strall that glitters is gold/str
/arr
/doc

(psuedo-XML from memory, may not be accurate but illustrates the point)

Thanks.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com