TermVectorComponent : Required / Optional Parameters

View: New views
6 Messages — Rating Filter:   Alert me  

TermVectorComponent : Required / Optional Parameters

by Chantal Ackermann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by Grant Ingersoll-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

by Chantal Ackermann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

by hossman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


: 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

by Grant Ingersoll-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

by Chantal Ackermann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
>