You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2012/06/08 05:53:25 UTC

[jira] [Updated] (SOLR-2352) TermVectorComponent fails with "Undefined Field" errors for score, *, or any Solr 4x psuedo-fields used in the "fl" param.

     [ https://issues.apache.org/jira/browse/SOLR-2352?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man updated SOLR-2352:
---------------------------

    Attachment: SOLR-2352.patch

patch with tests that fixes the core bug ... ReturnFields is used by TVC to parse the "fl" and only real fields found in it are used ... which fixes the "* is not a field" bug and brings the functionality back on par with past releases if any globs, functions or transformers are used in fl.

But looking at the code i think there's a lot of room for improvement:

* no partial globs are supported in fl or tv.fl (ie: "fl=*_t"
* per field override options are ignored when all TV are returned for all fields (either because of "fl=*" or no fl/tv.fl
* code structure is wonky

...the last item seemingly a relic from when the code use to use the "TermVectorMapper" interface to walk the vectors the various fields, and used diff code paths depending on wether "all" fields were requested, or just specific ones.

I'm going to try and take a stab at refactoring this to only ever use "reader.getTermVectors(docId)" (combined with ReturnFields.wantField) .. but if i don't get to it, this patch should still be good to go for 4.0


                
> TermVectorComponent fails with "Undefined Field" errors for score, *, or any Solr 4x psuedo-fields used in the "fl" param.
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2352
>                 URL: https://issues.apache.org/jira/browse/SOLR-2352
>             Project: Solr
>          Issue Type: Bug
>          Components: SearchComponents - other
>    Affects Versions: 3.1
>         Environment: Ubuntu 10.04/Arch solr 3.x branch r1058326
>            Reporter: Jed Glazner
>             Fix For: 4.0
>
>         Attachments: SOLR-2352.patch
>
>
> When searching using the term vector components and setting fl=*,score the result is a http 400 error 'undefined field: *'. If you disable the tvc the search works properly.
> Example bad request...
> {code}http://localhost:8983/solr/select/?qt=tvrh&q=includes:[*+TO+*]&fl=*{code}
> 3.1 stack trace:
> {noformat}
> SEVERE: org.apache.solr.common.SolrException: undefined field: *
>    at org.apache.solr.handler.component.TermVectorComponent.process(TermVectorComponent.java:142)
> ...
> {noformat}
> The work around is to explicitly use the tv.fl param when using psuedo-fields in the fl...
> {code}http://localhost:8983/solr/select/?qt=tvrh&q=includes:[*+TO+*]&fl=*&tv.fl=includes{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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