Re: XInclude and Document Entity not working on schema.xml

2013-07-24 Thread Elodie Sannier

I'm using java-1.7.0-openjdk-1.7.0.3-2.1.el6.1.x86_64 and
tomcat6-6.0.24-48.el6_3.noarch.

I tested with the 4.4 solr version but I still have the bug.

Elodie

Kelkoo SAS
Société par Actions Simplifiée
Au capital de € 4.168.964,30
Siège social : 8, rue du Sentier 75002 Paris
425 093 069 RCS Paris

Ce message et les pièces jointes sont confidentiels et établis à l'attention 
exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce 
message, merci de le détruire et d'en avertir l'expéditeur.


Re: XInclude and Document Entity not working on schema.xml

2013-07-23 Thread Elodie Sannier

Hello Chris,

Thank you for your help.

I checked differences between my files and your test files but I didn't
find bugs in my files.

All my files are in the same directory: collection1/conf

= schema.xml content:

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE schema [
!ENTITY commonschema_types SYSTEM commonschema_types.xml
!ENTITY commonschema_others SYSTEM commonschema_others.xml
]
schema name=searchSolrSchema version=1.5

  types

fieldType name=text_stemmed class=solr.TextField
positionIncrementGap=100 omitNorms=true
!-- FR : french --
!-- least aggressive stemming --
  analyzer type=index
tokenizer class=solr.StandardTokenizerFactory/
filter
class=com.kelkoo.search.solr.plugins.stemmer.fr.KelkooFrenchMinimalStemFilterFactory/

  /analyzer
  analyzer type=query
tokenizer class=solr.StandardTokenizerFactory/
filter
class=com.kelkoo.search.solr.plugins.stemmer.fr.KelkooFrenchMinimalStemFilterFactory/
  /analyzer
/fieldType

commonschema_types;

  /types

  commonschema_others;

/schema

= commonschema_types.xml content:

fieldType name=string class=solr.StrField
sortMissingLast=true omitNorms=true/
fieldType name=boolean class=solr.BoolField
sortMissingLast=true omitNorms=true/

!-- int is for exact ids, work with grouped=true and distrib=true --
fieldType name=int
class=solr.TrieIntField  precisionStep=0
sortMissingLast=true omitNorms=true positionIncrementGap=0/

!-- tint is for numbers that need sorting and/or range queries
(precisionStep=4 has better performance than precisionStep=8)
   and that do *not* need grouping (grouping
does not work in distrib=true for tint)--
fieldType name=tint
class=solr.TrieIntField precisionStep=4
sortMissingLast=true omitNorms=true positionIncrementGap=0/

fieldType name=long class=solr.TrieLongField precisionStep=0
positionIncrementGap=0/
fieldType name=byte class=solr.ByteField omitNorms=true/
fieldType name=float class=solr.TrieFloatField
sortMissingLast=true omitNorms=true/

 !-- A general text field which tokenizes with StandardTokenizer
 omitNorms=true means the (index time) lenghtNorm will be the
same whatever the number of tokens.
  --
fieldType name=text_general class=solr.TextField
positionIncrementGap=100 omitNorms=true
  analyzer type=index
tokenizer class=solr.StandardTokenizerFactory/
  /analyzer
  analyzer type=query
tokenizer class=solr.StandardTokenizerFactory/
  /analyzer
/fieldType


commonschema_others; include works.

Do you see something wrong ?

Unfortunately I cannot use the 4.3.0 version because I'm using solr.xml
sharedLib which does not work in 4.3.0
(cf.https://issues.apache.org/jira/browse/SOLR-4791).
Where can I found the newly voted 4.4 ?
I have this bug with the nightly 4.5-2013-07-18_06-04-44 found here
https://builds.apache.org/job/Solr-Artifacts-4.x/lastSuccessfulBuild/artifact/solr/package/
(the 18th of july).

Elodie Sannier


Kelkoo SAS
Société par Actions Simplifiée
Au capital de € 4.168.964,30
Siège social : 8, rue du Sentier 75002 Paris
425 093 069 RCS Paris

Ce message et les pièces jointes sont confidentiels et établis à l'attention 
exclusive de leurs destinataires. Si vous n'êtes pas le destinataire de ce 
message, merci de le détruire et d'en avertir l'expéditeur.


Re: XInclude and Document Entity not working on schema.xml

2013-07-23 Thread Chris Hostetter

Elodie:  I just tested your configs (as close as i could get since i don't 
have the com.kelkoo classes) using the current HEAD of the 4x branch and 
had no problems with the entity includes.

what java version/vendor are you using?  

are you using the provided jetty or your own servlet container?

My best guess is that some combination of JVM version or servlet container 
implementation is subtly affecting the way the XML files are getting 
parsed, introducing the xml:base attribute in a way that isn't getting 
cleanly ignored by the code added to handle that in the issue you noted 
before ... but w/o being able to reproduce that's just a guess.

: Where can I found the newly voted 4.4 ?

the release announcement just went live on the mailing list, and it's now 
the main download link on the website...

https://lucene.apache.org/solr/downloads.html


-Hoss


Re: XInclude and Document Entity not working on schema.xml

2013-07-22 Thread Chris Hostetter
: to use Document Entity in schema.xml, I get this exception :
: java.lang.RuntimeException: schema fieldtype
: string(org.apache.solr.schema.StrField) invalid
: arguments:{xml:base=solrres:/commonschema_types.xml}

Elodie can you please open a bug in jira for this with your specific 
example?  please note in the Jira your comment that it works in Solr 4.2.1 
but fails in later versions (if you could test with 4.3 and the newly 
voted 4.4 that would be helpful.)

: The same error appears in this bug (fixed ?):
: https://issues.apache.org/jira/browse/SOLR-3087

That issue was specific to xinclude, not document entities, so it's 
possible the fix applied there did not affect/fix document entities -- but 
since you mentioned that you see document entity includes of 
fieldTypes working in 4.2.1 suggests that it might be a slightly diff 
problem, otherwise i would expect to see it fail as far back as 4.0 just 
like SOLR-3087...

: I also try to use use XML XInclude mechanism
: (http://en.wikipedia.org/wiki/XInclude) to include parts of schema.xml.
: 
: When I try to include a fieldType, I get this exception :
: org.apache.solr.common.SolrException: Unknown fieldType 'long' specified

...the issue you linked to before (SOLR-3087) included a specific test to 
ensure that fieldTYpes could be include like this, and that test works -- 
so pehaps in your testing you have some other subtle bug?  what are the 
absolute paths of the various files you are trying to include in one 
another?


-Hoss


Re: XInclude and Document Entity not working on schema.xml

2013-07-22 Thread Chris Hostetter

: Elodie can you please open a bug in jira for this with your specific 
...
: ...the issue you linked to before (SOLR-3087) included a specific test to 
: ensure that fieldTYpes could be include like this, and that test works -- 
: so pehaps in your testing you have some other subtle bug?  what are the 
: absolute paths of the various files you are trying to include in one 
: another?

Hmm... actually, i had some time while i was on a conf call, so i just 
updated the test to also test entity includes, and i wan't able to 
reproduce either of hte problems you described.

can you please take a look at this test, and the configs it uses, and 
compare with how you are trying to do things...

http://svn.apache.org/r1505749

http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/core/TestXIncludeConfig.java?view=markup
http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/collection1/conf/schema-xinclude.xml?view=markup
http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/collection1/conf/schema-snippet-types.incl?view=markup
http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test-files/solr/collection1/conf/schema-snippet-type.xml?view=markup



-Hoss