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 AHMET ARSLAN <io...@yahoo.com> on 2009/11/08 12:11:17 UTC
schema.jsp is not displaying tint types corretly
I have a field defined tint with values 100,200,300 and -100 only.
When i use admin/schema.jsp i see 5 distinct values.
0 666083
100 431176
200 234907
256 33947
300 33947
First i thought that i post wrong values. I was expecting 4 distinct values.
When i query flag_value:256 i get 0 docs. Same as with flag_value:0.
100 200 and 300 works as expected. So i concluded that there is something wrong with schema.jsp with tint types. I am using solr-2009-11-03.tgz
By the way, trie types makes sorts faster? Or they are only useful in range queries?
Re: schema.jsp is not displaying tint types corretly
Posted by Chris Hostetter <ho...@fucit.org>.
: So we can say that it is normal to see weird vaules in schema.jsp for trie types. Thanks for the explanations.
it's normal to see weird values in schema.jsp for all types, trie, stemmed, etc...
-Hoss
Re: schema.jsp is not displaying tint types corretly
Posted by AHMET ARSLAN <io...@yahoo.com>.
> I'm not an expert on Trie fields, but you need to remember
> that schema.jsp
> shows you the *indexed* values, and the whole point of
> TrieFields is to
> create multiple indexed values at various levels of
> precision so that
> range queries can be much faster.
>
> : When i query flag_value:256 i get 0 docs. Same as with
> flag_value:0.
>
> ...which is to be expected since you didn't index any docs
> with those
> exact values. If you facet on that field, you should
> see the 4 values you
> expect (and no others) because the faceting code for
> TreiFields knows
> about the special values, but schema.jsp just tells you
> exactly what's in
> the index.
Yes tint is the default one comes with schema.xml. I queried *:* and faceted on that field, result is just like as you said:
<lst name="flag_value">
<int name="100">1132679</int>
<int name="200">207459</int>
<int name="300">27474</int>
</lst>
So we can say that it is normal to see weird vaules in schema.jsp for trie types. Thanks for the explanations.
Re: schema.jsp is not displaying tint types corretly
Posted by Chris Hostetter <ho...@fucit.org>.
: I have a field defined tint with values 100,200,300 and -100 only.
i assume you mean that tint is a solr.TrieIntField, probably with precisionStep="8" ?
: When i use admin/schema.jsp i see 5 distinct values.
...
: First i thought that i post wrong values. I was expecting 4 distinct values.
I'm not an expert on Trie fields, but you need to remember that schema.jsp
shows you the *indexed* values, and the whole point of TrieFields is to
create multiple indexed values at various levels of precision so that
range queries can be much faster.
: When i query flag_value:256 i get 0 docs. Same as with flag_value:0.
...which is to be expected since you didn't index any docs with those
exact values. If you facet on that field, you should see the 4 values you
expect (and no others) because the faceting code for TreiFields knows
about the special values, but schema.jsp just tells you exactly what's in
the index.
-Hoss
Re: schema.jsp is not displaying tint types corretly
Posted by AHMET ARSLAN <io...@yahoo.com>.
> maybe you indexed some documents with
> value 256, but then deleted them? try optimizing to
> get the terms removed.
I am running full-import with DIH. No deletions. And domain of this type is exactly 100,200,300 and -100. I am using this SQL query to fetch that field:
SELECT CASE WHEN ... THEN 300 WHEN ... THEN 200 WHEN ... THEN 100 ELSE -100 END AS flag_value FROM ...
I just optimized just to make sure. The same:
Distinct: 7
0 987692
100 751304
200 236388
256 33830
300 33830
Interestingly it says there is 7 distinct values. When i try to see top 7 terms it always shows top 5. Also changes the value of top terms textbox to 5 again.
Re: schema.jsp is not displaying tint types corretly
Posted by Erik Hatcher <er...@gmail.com>.
maybe you indexed some documents with value 256, but then deleted
them? try optimizing to get the terms removed.
Erik
On Nov 8, 2009, at 6:11 AM, AHMET ARSLAN wrote:
> I have a field defined tint with values 100,200,300 and -100 only.
> When i use admin/schema.jsp i see 5 distinct values.
>
> 0 666083
> 100 431176
> 200 234907
> 256 33947
> 300 33947
>
> First i thought that i post wrong values. I was expecting 4 distinct
> values.
> When i query flag_value:256 i get 0 docs. Same as with flag_value:0.
> 100 200 and 300 works as expected. So i concluded that there is
> something wrong with schema.jsp with tint types. I am using
> solr-2009-11-03.tgz
>
> By the way, trie types makes sorts faster? Or they are only useful
> in range queries?
>
>
>