Re: strange SOLR behavior with required field attribute

2011-01-10 Thread Bernd Fehling
Hi Koji,

I'm using apache-solr-4.0-2010-11-24_09-25-17 from trunk.

A grep for "SOLR-1973" in CHANGES.txt says that it should have been fixed.
Strange...

Regards,
Bernd



Am 10.01.2011 16:14, schrieb Koji Sekiguchi:
> (11/01/10 23:26), Bernd Fehling wrote:
>> Dear list,
>>
>> while trying different options with DIH and SciptTransformer I also
>> tried using the "required=true" option for a field.
>>
>> I have 3 records:
>> 
>>  
>>  first title
>>  identifier_01
>>  http://www.foo.com/path/bar.html
>>  
>>  
>>  second title
>>  identifier_02
>>  
>>  
>>  
>>  thierd title
>>  identifier_03
>>  
>> 
>>
>> schema.xml snippet:
>> 
>> 
>> > required="true" />
>>
>> After loading I have 2 records in the index.
>>
>> first title
>> identifier_01
>> http://www.foo.com/path/bar.html
>>
>> second title
>> identifier_02
>> 
>>
>> Sure, I get an SolrException in the logs saying "missing required
>> field: link"
>> but this is for the third record whereas the second record gets loaded
>> even if
>> link is empty.
>>
>> So I guess this is a "feature" of Solr?
>>
>> And the required attribute means the presense of the tag and not
>> the presense of content for the tag, right?
>>
>> Regards
>> Bernd
> 
> Bernd,
> 
> Seems like same problem of SOLR-1973 that I've recently fixed
> in trunk and 3x, but I'm not sure. Which version are you using?
> Can you try trunk or 3x? If you still get same error with trunk/3x,
> please open a jira issue.
> 
> Koji


Re: strange SOLR behavior with required field attribute

2011-01-10 Thread Koji Sekiguchi

(11/01/10 23:26), Bernd Fehling wrote:

Dear list,

while trying different options with DIH and SciptTransformer I also
tried using the "required=true" option for a field.

I have 3 records:

 
 first title
 identifier_01
 http://www.foo.com/path/bar.html
 
 
 second title
 identifier_02
 
 
 
 thierd title
 identifier_03
 


schema.xml snippet:




After loading I have 2 records in the index.

first title
identifier_01
http://www.foo.com/path/bar.html

second title
identifier_02


Sure, I get an SolrException in the logs saying "missing required field: link"
but this is for the third record whereas the second record gets loaded even if
link is empty.

So I guess this is a "feature" of Solr?

And the required attribute means the presense of the tag and not
the presense of content for the tag, right?

Regards
Bernd


Bernd,

Seems like same problem of SOLR-1973 that I've recently fixed
in trunk and 3x, but I'm not sure. Which version are you using?
Can you try trunk or 3x? If you still get same error with trunk/3x,
please open a jira issue.

Koji
--
http://www.rondhuit.com/en/


strange SOLR behavior with required field attribute

2011-01-10 Thread Bernd Fehling
Dear list,

while trying different options with DIH and SciptTransformer I also
tried using the "required=true" option for a field.

I have 3 records:


first title
identifier_01
http://www.foo.com/path/bar.html


second title
identifier_02



thierd title
identifier_03



schema.xml snippet:




After loading I have 2 records in the index.

first title
identifier_01
http://www.foo.com/path/bar.html

second title
identifier_02


Sure, I get an SolrException in the logs saying "missing required field: link"
but this is for the third record whereas the second record gets loaded even if
link is empty.

So I guess this is a "feature" of Solr?

And the required attribute means the presense of the tag and not
the presense of content for the tag, right?

Regards
Bernd