lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1556) TermVectorComponents should provide good error messages when fieldtype isn't compatible with requested options
Date Tue, 18 May 2010 23:48:55 GMT

    [ https://issues.apache.org/jira/browse/SOLR-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12868910#action_12868910
] 

Hoss Man commented on SOLR-1556:
--------------------------------

skimming the code a bit, this doesn't seem easy to be a very a clean way to do this.  

TVC allows multiple fields to be specified at once, but the positions & offsets options
can not be specified per field -- so if the user wants termVectors for fieldA and termVectors
plus position info for fieldB, there is no way for them to distinguish that they don't care
about position info for fieldA -- if fieldA doens't have positions enabled in the schema,
making TVC error based on that request would do the user a dis-service.  Even if there is
no clean way to ask for it, the scema supports what they want -- so we shouldn't error.

I considerd breifly what it would take to make TVC support per-field overrides for the various
options -- the trickiness comes from hte fact that it doesn't iterate over the list of fields
itself.  It builds up a custom TermVectorMapper to pass to IndexReader.getTermFreqVector for
each doc.  So we'd need to modify that TermVectorMapper impl to know about the SolrQueryRequest
so it could check the options per field instead of just specifying the booleans when it's
constructed.

Things are also complicated by the fact that the tv.fl param defaults to the fl param -- so
even if users enable termVectors, positions, and offsets for all the fields they care about,
and they could starting getting errors if a new field is added to the "fl" when they *don't*
care about any of that info.

All told: this may be one of the situations where an actual "error" isn't in hte best interests
of the user -- adding a warning to the TVC output for each field/option combo that doesn't
make sense is probably more useful.


> TermVectorComponents should provide good error messages when fieldtype isn't compatible
with requested options
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1556
>                 URL: https://issues.apache.org/jira/browse/SOLR-1556
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 1.4
>            Reporter: Hoss Man
>            Assignee: Grant Ingersoll
>             Fix For: 1.5
>
>
> As noted by grant on the email list, asking TermVectorComponent for things like termVectors,
positions, and offsets can't produce meaningful results unless the field in question has the
corrisponding schema option set to true -- but the behavior of TVC when they not true is confusing
to users. 
> We should make TVC return a meaningful error if it's asked to return  a certain type
of info for field that it can't deal with - something making it clear what properties of hte
schema need to be changed to make it work...
> http://old.nabble.com/Re%3A-TermVectorComponent-%3A-Required---Optional-Parameters-p26181454.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message