[
https://issues.apache.org/jira/browse/SOLR-4318?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13558123#comment-13558123
]
Erick Erickson edited comment on SOLR-4318 at 1/19/13 11:41 PM:
----------------------------------------------------------------
Hmmm, this is an invalid field definition, you have to have at least one
tokenizer or your field doesn't do anything.
I can mask the error with a couple of trivial changes (see patch attached) but
I don't think that's really a good fix. It seems we should (in order of my
preference, either of my two <1>'s work for me)
1> fail hard at startup and force a valid fieldType definition before
continuing.
1> default to WhitespaceTokenizer if no analysis chain defined. I can make get
onboard with this being reasonable behavior
2> do nothing. I think this is a bad solution, violates the "fail early"
policy, doesn't fail until someone happens to do a wildcard
3> put in a trivial fix (two places have to test for null like in the patch). I
don't like this either, I'm sure Junaid's next question would be that results
weren't as expected, everyone wastes time then.
Anyone want to weigh in?
was (Author: erickerickson):
Hmmm, this is an invalid field definition, you have to have at least one
tokenizer or your field doesn't do anything.
I can mask the error with a couple of trivial changes (see patch attached) but
I don't think that's really a good fix. It seems we should (in order of my
preference)
1> fail hard at startup and force a valid fieldType definition before
continuing.
2> do nothing. I think this is a bad solution, violates the "fail early"
policy, doesn't fail until someone happens to do a wildcard
3> put in a trivial fix (two places have to test for null like in the patch). I
don't like this either, I'm sure Junaid's next question would be that results
weren't as expected, everyone wastes time then.
Anyone want to weigh in?
> NullPointerException encountered when /select query on solr.TextField.
> ----------------------------------------------------------------------
>
> Key: SOLR-4318
> URL: https://issues.apache.org/jira/browse/SOLR-4318
> Project: Solr
> Issue Type: Bug
> Components: Build
> Affects Versions: 4.0
> Reporter: Junaid Surve
> Assignee: Erick Erickson
> Labels: query, select
> Attachments: SOLR-4318.patch
>
>
> I have two fields, one is title and the other is description in my Solr
> schema like -
> Type - <fieldType name="text" class="solr.TextField"
> positionIncrementGap="100"/>
> Declaration - <field name="description" type="text" indexed="true"
> stored="true"/>
> without any tokenizer or filter.
> On querying /select?q=description:myText it works. However when I add a '*'
> it fails.
> Failure scenario -
> /select?q=description:*
> /select?q=description:myText*
> .. etc
> solrconfig.xml -
> <requestHandler name="/select" class="solr.SearchHandler">
> <lst name="defaults">
> <str name="echoParams">explicit</str>
> <int name="rows">10</int>
> <str name="df">title</str>
> </lst>
> </requestHandler>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]