You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Chantal Ackermann <ch...@btelligent.de> on 2009/11/03 15:37:32 UTC

TermVectorComponent : Required / Optional Parameters

Hi all!

Are these attributes required to make TermVectorComponent requests work?
  termPositions="true" termOffsets="true"

I have quite a lot of fields with termVectors="true" (for facetting), 
but I don't get any results when requesting:
.../solr/epg/select?q=*%3A*&version=2.2&start=0&rows=1
&indent=on&tv=true&tv.tf=true&tv.df=true&tv.positions&tv.offsets=true

(I don't have a special RequestHandler configured for it. Using 1.4.0RC)

Would it be possible to add the use case "TermVectorComponent" to that 
Wiki page?

http://wiki.apache.org/solr/FieldOptionsByUseCase

(And also add that info to the TermVectorComponent wiki page.)

Thanks!
Chantal

Re: TermVectorComponent : Required / Optional Parameters

Posted by Grant Ingersoll <gs...@apache.org>.
On Nov 3, 2009, at 7:59 AM, Chantal Ackermann wrote:

> Hi Grant,
>
> I'd be glad to help update the wiki.
> But just to make sure I'm understanding correctly:
> for TermVectorComponent to work correctly, all these three  
> attributes (termVectors, termPositions, termOffsets) must be set to  
> "true"?

No, you only need termVectors=true to get back results.  You need  
offsets and positions stored to get them back when requested.



>
> No matter how extensive the termVector request will look like?
>
> Because I tried this request also and it doesn't return the  
> termVector part, neither:
> .../solr/epg/select?q=* 
> %3A 
> *&version=2.2&start=0&rows=0&indent=on&tv=true&tv.tf=true&tv.df=true

I notice in your request, you were asking for rows=0.  TVC works off  
the rows returned by the search.

>
> (I tried removing and adding the last two parameters, as well.)
>
> Is there anything else I have to be aware of? How about
> indexed
> stored
> multiValued
> omitNorms
>
> Is there a combination that does not work?
>
> Once I get it to work, I'll update the wiki. But I don't want to  
> publish my ignorance. ;-)
>
> Thanks,
> Chantal
>
>
> Grant Ingersoll schrieb:
>> On Nov 3, 2009, at 6:37 AM, Chantal Ackermann wrote:
>>> Hi all!
>>>
>>> Are these attributes required to make TermVectorComponent requests
>>> work?
>>> termPositions="true" termOffsets="true"
>>>
>>> I have quite a lot of fields with termVectors="true" (for
>>> facetting), but I don't get any results when requesting:
>>> .../solr/epg/select?q=*%3A*&version=2.2&start=0&rows=1
>>> &indent 
>>> =on&tv=true&tv.tf=true&tv.df=true&tv.positions&tv.offsets=true
>> Indeed, you must have stored positions and offsets for the TVC to
>> return positions and offsets.
>>> (I don't have a special RequestHandler configured for it. Using
>>> 1.4.0RC)
>>>
>>> Would it be possible to add the use case "TermVectorComponent" to
>>> that Wiki page?
>> Yep, please do.  Anyone can edit the wiki, you just need an account.
>>> http://wiki.apache.org/solr/FieldOptionsByUseCase
>>>
>>> (And also add that info to the TermVectorComponent wiki page.)
>>>
>>> Thanks!
>>> Chantal

--------------------------
Grant Ingersoll
http://www.lucidimagination.com/

Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids)  
using Solr/Lucene:
http://www.lucidimagination.com/search


Re: TermVectorComponent : Required / Optional Parameters

Posted by Chantal Ackermann <ch...@btelligent.de>.
Hi Grant,

I'd be glad to help update the wiki.
But just to make sure I'm understanding correctly:
for TermVectorComponent to work correctly, all these three attributes 
(termVectors, termPositions, termOffsets) must be set to "true"?

No matter how extensive the termVector request will look like?

Because I tried this request also and it doesn't return the termVector 
part, neither:
.../solr/epg/select?q=*%3A*&version=2.2&start=0&rows=0&indent=on&tv=true&tv.tf=true&tv.df=true

(I tried removing and adding the last two parameters, as well.)

Is there anything else I have to be aware of? How about
indexed
stored
multiValued
omitNorms

Is there a combination that does not work?

Once I get it to work, I'll update the wiki. But I don't want to publish 
my ignorance. ;-)

Thanks,
Chantal


Grant Ingersoll schrieb:
> On Nov 3, 2009, at 6:37 AM, Chantal Ackermann wrote:
> 
>> Hi all!
>>
>> Are these attributes required to make TermVectorComponent requests
>> work?
>> termPositions="true" termOffsets="true"
>>
>> I have quite a lot of fields with termVectors="true" (for
>> facetting), but I don't get any results when requesting:
>> .../solr/epg/select?q=*%3A*&version=2.2&start=0&rows=1
>> &indent=on&tv=true&tv.tf=true&tv.df=true&tv.positions&tv.offsets=true
> 
> Indeed, you must have stored positions and offsets for the TVC to
> return positions and offsets.
> 
>> (I don't have a special RequestHandler configured for it. Using
>> 1.4.0RC)
>>
>> Would it be possible to add the use case "TermVectorComponent" to
>> that Wiki page?
> 
> Yep, please do.  Anyone can edit the wiki, you just need an account.
> 
>> http://wiki.apache.org/solr/FieldOptionsByUseCase
>>
>> (And also add that info to the TermVectorComponent wiki page.)
>>
>> Thanks!
>> Chantal
> 
> 

Re: TermVectorComponent : Required / Optional Parameters

Posted by Chantal Ackermann <ch...@btelligent.de>.
Now it works. I was missing the TermVectorComponent and the 
corresponding RequestHandler from the solrconfig.xml, and also the 
parameter qt=tvrh from the request.
I had the impression these changes were optional. I would change the 
wiki to emphasize that they are a requirement.

I don't think it is sufficient to add only the searchComponent element 
to solrConfig.xml. If I do not add the qt=tvrh parameter, I don't get 
the termVectors results. Even with that entry in the solrconfig.xml.

Another question:
If I get strange strings back for fields, this is probably because they 
are of type "sint", isn't it?

Example: <str name="uniqueKey">#8;#0;#0;ϟ繋</str>

Thanks!
Chantal



Chris Hostetter schrieb:
> : Indeed, you must have stored positions and offsets for the TVC to return
> : positions and offsets.
> 
> we should probably make the TermVectorCOmponent more resilient and
> actaully assert these things about the field (using the schema metadata)
> ... it can add warning/error info to the output if it's asked for
> soemthing it can't generate.
> 
> 
> 
> 
> -Hoss
> 

Re: TermVectorComponent : Required / Optional Parameters

Posted by Chris Hostetter <ho...@fucit.org>.
: Indeed, you must have stored positions and offsets for the TVC to return
: positions and offsets.

we should probably make the TermVectorCOmponent more resilient and 
actaully assert these things about the field (using the schema metadata) 
... it can add warning/error info to the output if it's asked for 
soemthing it can't generate.




-Hoss


Re: TermVectorComponent : Required / Optional Parameters

Posted by Grant Ingersoll <gs...@apache.org>.
On Nov 3, 2009, at 6:37 AM, Chantal Ackermann wrote:

> Hi all!
>
> Are these attributes required to make TermVectorComponent requests  
> work?
> termPositions="true" termOffsets="true"
>
> I have quite a lot of fields with termVectors="true" (for  
> facetting), but I don't get any results when requesting:
> .../solr/epg/select?q=*%3A*&version=2.2&start=0&rows=1
> &indent=on&tv=true&tv.tf=true&tv.df=true&tv.positions&tv.offsets=true

Indeed, you must have stored positions and offsets for the TVC to  
return positions and offsets.

>
> (I don't have a special RequestHandler configured for it. Using  
> 1.4.0RC)
>
> Would it be possible to add the use case "TermVectorComponent" to  
> that Wiki page?

Yep, please do.  Anyone can edit the wiki, you just need an account.

>
> http://wiki.apache.org/solr/FieldOptionsByUseCase
>
> (And also add that info to the TermVectorComponent wiki page.)
>
> Thanks!
> Chantal