|
|
bburke71@... 2008-10-10, 11:45
U ------Original Message------ From: sanraj25 To: [EMAIL PROTECTED] ReplyTo: [EMAIL PROTECTED] Sent: Oct 9, 2008 10:13 PM Subject: Re: sint in schema.xmlHi, I create own field name using integer field type and sint field type(solr.SortableIntField) in schema.xml. i can't differentiate between these two field type. When this sint exactly use? If we use sint how it is sortable? sanraj25 wrote: > > Hi, > I create own field name using integer field type and sint field > type(solr.SortableIntField) in schema.xml. > i can't differentiate between these two field type. When this sint exactly > use? If we use sint how it is sortable? I test by {sort =field name} in > query window .but it's not work properly.please tell me with clear example > thanks in advance > > -sanraj > > -- View this message in context: http://www.nabble.com/sint-in-schema.xml-tp19900303p19911165.htmlSent from the Solr - User mailing list archive at Nabble.com. Sent via BlackBerry by AT&T
+
bburke71@... 2008-10-10, 11:45
Francisco Sanmartin 2008-10-10, 15:34
In lucene, all the data is stored as strings, so if you have a field defined as integer or sint, in lucene are strings, and if you try to sort numbers represented as strings what happens is this:
example numbers: 1,2,3,4,5,6,7,8,9,10,11,12,13. ordered as strings: 1,10,11,12,13,2,3,4,5,6,7,8,9
That's why there is a field type called sint, that means sortable int. Is the same as int with the difference that it will order the numbers properly.
example numbers: 1,2,3,4,5,6,7,8,9,10,11,12,13. order being int: 1,10,11,12,13,2,3,4,5,6,7,8,9 order being sint: 1,2,3,4,5,6,7,8,9,10,11,12,13.
Pako
[EMAIL PROTECTED] wrote: > U > ------Original Message------ > From: sanraj25 > To: [EMAIL PROTECTED] > ReplyTo: [EMAIL PROTECTED] > Sent: Oct 9, 2008 10:13 PM > Subject: Re: sint in schema.xml > > > Hi, > I create own field name using integer field type and sint field > type(solr.SortableIntField) in schema.xml. > i can't differentiate between these two field type. When this sint exactly > use? If we use sint how it is sortable? > > > > sanraj25 wrote: > >> Hi, >> I create own field name using integer field type and sint field >> type(solr.SortableIntField) in schema.xml. >> i can't differentiate between these two field type. When this sint exactly >> use? If we use sint how it is sortable? I test by {sort =field name} in >> query window .but it's not work properly.please tell me with clear example >> thanks in advance >> >> -sanraj >> >> >> > >
+
Francisco Sanmartin 2008-10-10, 15:34
Chris Hostetter 2008-10-10, 17:48
: as integer or sint, in lucene are strings, and if you try to sort numbers : represented as strings what happens is this:
Field sorting in Solr on both IntField and SortableIntField should work becuase they both use the 'integer' FieldCache under the covers -- but where you'll really see a difference is in Range Queries (it's admittedly a slightly confusing aspect of hte name, but it's spelled out fairly well in the example schema.xml) ...
<!-- numeric field types that store and index the text value verbatim (and hence don't support range queries, since the lexicographic ordering isn't equal to the numeric ordering) --> <fieldType name="integer" class="solr.IntField" omitNorms="true"/> ... <!-- Numeric field types that manipulate the value into a string value that isn't human-readable in its internal form, but with a lexicographic ordering the same as the numeric ordering, so that range queries work correctly. --> <fieldType name="sint" class="solr.SortableIntField" sortMissingLast="true" omitNorms="true"/>
: > > use? If we use sint how it is sortable? I test by {sort =field name} in : > > query window .but it's not work properly.please tell me with clear example : > > thanks in advance
can you elaborate on what exactly you have tried, and what you mean by "it's not work properly" ? -Hoss
+
Chris Hostetter 2008-10-10, 17:48
sanraj25 2008-10-09, 14:37
Hi, I create own field name using integer field type and sint field type(solr.SortableIntField) in schema.xml. i can't differentiate between these two field type. When this sint exactly use? If we use sint how it is sortable? I test by {sort =field name} in query window .but it's not work properly.please tell me with clear example thanks in advance -sanraj -- View this message in context: http://www.nabble.com/sint-in-schema.xml-tp19900303p19900303.htmlSent from the Solr - User mailing list archive at Nabble.com.
+
sanraj25 2008-10-09, 14:37
sanraj25 2008-10-10, 03:13
Hi, I create own field name using integer field type and sint field type(solr.SortableIntField) in schema.xml. i can't differentiate between these two field type. When this sint exactly use? If we use sint how it is sortable? sanraj25 wrote: > > Hi, > I create own field name using integer field type and sint field > type(solr.SortableIntField) in schema.xml. > i can't differentiate between these two field type. When this sint exactly > use? If we use sint how it is sortable? I test by {sort =field name} in > query window .but it's not work properly.please tell me with clear example > thanks in advance > > -sanraj > > -- View this message in context: http://www.nabble.com/sint-in-schema.xml-tp19900303p19911165.htmlSent from the Solr - User mailing list archive at Nabble.com.
+
sanraj25 2008-10-10, 03:13
|
|