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 小川修 <sh...@gmail.com> on 2014/05/28 05:54:32 UTC

Strict mode at searching and indexing

Hi.

I use Solr4.7.2.

When I search by wrong query
for example
[non_exists_field:value].

Or, when I index by wrong xml
for example
[<add><doc><field name="non_exist_field">value</field></doc></add>]

Solr reports nothing.

I want to get error message.
Is there option that makes Solr strict?

Thanks.

Re: Strict mode at searching and indexing

Posted by Erick Erickson <er...@gmail.com>.
right, if that line is uncommented, then _anything_ you throw at Solr will
be processed just fine. You've essentially told Solr "there's no input
that's wrong".

Perhaps confusingly, the "ignored" field type has stored="false" and
indexed="false" so the effect at indexing time is for the input to be,
well, ignored. At query time similarly I believe.

So try un-commenting, restarting Solr and see if the problem goes away.

Best,
Erick


On Tue, Jun 3, 2014 at 12:08 PM, T. Kuro Kurosaka <ku...@healthline.com>
wrote:

>
> On 05/30/2014 08:29 AM, Erick Erickson wrote:
>
>> I see errors in both cases. Do you
>> 1> have schemaless configured
>> or
>> 2> have a dynamic field pattern that matches your "non_exist_field"?
>>
> Maybe
>  <!--dynamicField name="*" type="ignored" multiValued="true" /-->
> is un-commented-out in schema.xml?
>
> Kuro
>
>

Re: Strict mode at searching and indexing

Posted by "T. Kuro Kurosaka" <ku...@healthline.com>.
On 05/30/2014 08:29 AM, Erick Erickson wrote:
> I see errors in both cases. Do you
> 1> have schemaless configured
> or
> 2> have a dynamic field pattern that matches your "non_exist_field"?
Maybe
  <!--dynamicField name="*" type="ignored" multiValued="true" /-->
is un-commented-out in schema.xml?

Kuro


Re: Strict mode at searching and indexing

Posted by Erick Erickson <er...@gmail.com>.
I see errors in both cases. Do you
1> have schemaless configured
or
2> have a dynamic field pattern that matches your "non_exist_field"?

Best,
Erick


On Tue, May 27, 2014 at 8:54 PM, 小川修 <sh...@gmail.com> wrote:

> Hi.
>
> I use Solr4.7.2.
>
> When I search by wrong query
> for example
> [non_exists_field:value].
>
> Or, when I index by wrong xml
> for example
> [<add><doc><field name="non_exist_field">value</field></doc></add>]
>
> Solr reports nothing.
>
> I want to get error message.
> Is there option that makes Solr strict?
>
> Thanks.
>