Trie fields index extra information to aid in ranges etc. So if
you indexed your data as non-trie, then asked Solr to read them
as trie fields, it's bound to be unfortunate. Or if you changed the
precisionstep. Or.
Your schema has to exactly reflect what your lucene program
did for indexing, and my guess is it doesn't...
Best
Erick
On Thu, Aug 23, 2012 at 10:55 AM, Petra Lehrmann
petra.lehrm...@tu-dortmund.de wrote:
Hello all!
I already posted this question to Stackoverflow
(http://stackoverflow.com/questions/12027451/solr-net-query-argumentexception-in-windows-forms)
but as is, either my question is too specific or just too trivial. I don't
know. But maybe I'm just trying to put the cart before the horse.
I have a C# Windows Forms application up and running. It uses the Lucene.Net
Library with which I created a Lucen index (off of a Postgres-database).
There are some articles which have more than one value, so I decided to take
numeric fields into account and used them in my application as:
| var valueField= new NumericField(internalname, Field.Store.YES,
true);
valueField.SetDoubleValue(value);
doc.Add(valueField);
|
|I can open my Lucene index in Luke and see all those nice fields I made, so
there should be no problem with the index; plus: my application searches and
displays the result sets of the lucene index quite fine.|
||
So I thought about trying Solr and read that I could use the Lucene index at
hand - I just had to edit the schema.xml file from Solr, which I did. For
the numeric field variables of the Lucene index I read somewhere that I have
to use TrieFields, so I updated my schema.xml as follows:
|fieldType name=tdouble class=solr.TrieDoubleField precisionStep=0
omitNorms=true positionIncrementGap=0/
[...]
field name=LuminaireId type=string indexed=true stored=true/
field name=LampCount type=tdouble multiValued=true indexed=true
stored=true required=false/
[...]
|||
For those fields, which use the numeric field I had the TrieDoubleField of
Solr in mind and changed them. Firing up Solr on Tomcat and hitting it with
a search query as LampCount:1 returned all the right documents. But the
xml-output always says:
|arr name=LampCount
strERROR:SCHEMA-INDEX-MISMATCH,stringValue=1/str
/arr
|
This could be the problem why my C# application is not running properly
(using the solrnet library as the brigde between Solr instance and
application) and always throws an ArgumentException when hitting my solrnet
implementation with:
| var results= solr.Query(LampCount:1);
|
But first things first: I'm not sure why there is this Index-Mismatch and
how to solve it -maybe I just didn't understand the explanation of
TrieFields or the port from NumericFields?
Any help would be greatly appreciated. :)
Greetings from Germany,
Petra
|
|