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 Ninad Raut <hb...@gmail.com> on 2009/08/14 11:08:03 UTC

Choosing between t and s field types

Hi,
I want certain fields of type int,float and date to be sortable and I should
be able to run my range queries as well as facet queries on those fields.
Now as far as I know sint,sfloat fieldtypes  make the fields sortable and
tint,tfloat,tdate allow range queries on the fields.
I want both these features in my fields. How can I make this happen?

Re: Choosing between t and s field types

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Sat, Aug 15, 2009 at 11:06 PM, Ninad Raut<hb...@gmail.com> wrote:
> Are all TrieRange fields sortable?

Yes, all of the numeric type variants are sortable.

-Yonik
http://www.lucidimagination.com



> On Fri, Aug 14, 2009 at 10:50 PM, Yonik Seeley <yo...@lucidimagination.com>
> wrote:
>>
>> On Fri, Aug 14, 2009 at 1:15 PM, Ninad Raut<hb...@gmail.com>
>> wrote:
>> > TrieRange ... what are its features? What additional functionality they
>> > provide?
>>
>> - a generally more efficient FieldCache structure (less memory)
>> - faster range queries when precisionStep is utilized to index
>> multiple tokens per value
>>
>> -Yonik
>> http://www.lucidimagination.com
>>
>> > On Fri, Aug 14, 2009 at 8:35 PM, Avlesh Singh <av...@gmail.com> wrote:
>> >
>> >> >
>> >> > I just checked and the default schema.xml for SOLR 1.3
>> >> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.So
>> >> either
>> >> > they''re new in 1.4 and I don't know about them or they were manually
>> >> > defined.
>> >> >
>> >> TrieRange fields are new and will make appearance in Solr 1.4. With 1.3
>> >> you
>> >> can use "sint" and "sfloat" for your use cases.
>> >>
>> >> @Ninad -
>> >>
>> >>
>> >> http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/
>> >>
>> >> Cheers
>> >> Avlesh
>> >>
>> >> On Fri, Aug 14, 2009 at 6:03 PM, Constantijn Visinescu
>> >> <ba...@gmail.com>wrote:
>> >>
>> >> > I just checked and the default schema.xml for SOLR 1.3
>> >> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.
>> >> > So either they''re new in 1.4 and I don't know about them or they
>> >> > were
>> >> > manually defined.
>> >> >
>> >> > Can you post your schema.xml entries for tint? (along with any
>> >> > comments
>> >> it
>> >> > might have?)
>> >> >
>> >> > Constantijn
>> >> >
>> >> > On Fri, Aug 14, 2009 at 1:39 PM, Ninad Raut
>> >> > <hbase.user.ninad@gmail.com
>> >> > >wrote:
>> >> >
>> >> > > Hi Constantijn,
>> >> > > What are the t types viz;tint,tfloat etc. for? Is there a special
>> >> > > use
>> >> of
>> >> > > these?
>> >> > >
>> >> > > On Fri, Aug 14, 2009 at 4:37 PM, Constantijn Visinescu
>> >> > > <ba...@gmail.com>wrote:
>> >> > >
>> >> > > > Accoridng to the documentation in schema.xml.original sint etc
>> >> > > > can be
>> >> > > used
>> >> > > > for both sorting and range queries?
>> >> > > >
>> >> > > >    <!-- 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"/>
>> >> > > >
>> >> > > >
>> >> > > > On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <
>> >> > hbase.user.ninad@gmail.com
>> >> > > > >wrote:
>> >> > > >
>> >> > > > > Hi,
>> >> > > > > I want certain fields of type int,float and date to be sortable
>> >> > > > > and
>> >> I
>> >> > > > > should
>> >> > > > > be able to run my range queries as well as facet queries on
>> >> > > > > those
>> >> > > fields.
>> >> > > > > Now as far as I know sint,sfloat fieldtypes  make the fields
>> >> sortable
>> >> > > and
>> >> > > > > tint,tfloat,tdate allow range queries on the fields.
>> >> > > > > I want both these features in my fields. How can I make this
>> >> happen?
>> >> > > > >
>> >> > > >
>> >> > >
>> >> >
>> >>
>> >
>
>

Re: Choosing between t and s field types

Posted by Ninad Raut <hb...@gmail.com>.
Are all TrieRange fields sortable?

On Fri, Aug 14, 2009 at 10:50 PM, Yonik Seeley
<yo...@lucidimagination.com>wrote:

> On Fri, Aug 14, 2009 at 1:15 PM, Ninad Raut<hb...@gmail.com>
> wrote:
> > TrieRange ... what are its features? What additional functionality they
> > provide?
>
> - a generally more efficient FieldCache structure (less memory)
> - faster range queries when precisionStep is utilized to index
> multiple tokens per value
>
> -Yonik
> http://www.lucidimagination.com
>
> > On Fri, Aug 14, 2009 at 8:35 PM, Avlesh Singh <av...@gmail.com> wrote:
> >
> >> >
> >> > I just checked and the default schema.xml for SOLR 1.3
> >> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.So
> >> either
> >> > they''re new in 1.4 and I don't know about them or they were manually
> >> > defined.
> >> >
> >> TrieRange fields are new and will make appearance in Solr 1.4. With 1.3
> you
> >> can use "sint" and "sfloat" for your use cases.
> >>
> >> @Ninad -
> >>
> >>
> http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/
> >>
> >> Cheers
> >> Avlesh
> >>
> >> On Fri, Aug 14, 2009 at 6:03 PM, Constantijn Visinescu
> >> <ba...@gmail.com>wrote:
> >>
> >> > I just checked and the default schema.xml for SOLR 1.3
> >> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.
> >> > So either they''re new in 1.4 and I don't know about them or they were
> >> > manually defined.
> >> >
> >> > Can you post your schema.xml entries for tint? (along with any
> comments
> >> it
> >> > might have?)
> >> >
> >> > Constantijn
> >> >
> >> > On Fri, Aug 14, 2009 at 1:39 PM, Ninad Raut <
> hbase.user.ninad@gmail.com
> >> > >wrote:
> >> >
> >> > > Hi Constantijn,
> >> > > What are the t types viz;tint,tfloat etc. for? Is there a special
> use
> >> of
> >> > > these?
> >> > >
> >> > > On Fri, Aug 14, 2009 at 4:37 PM, Constantijn Visinescu
> >> > > <ba...@gmail.com>wrote:
> >> > >
> >> > > > Accoridng to the documentation in schema.xml.original sint etc can
> be
> >> > > used
> >> > > > for both sorting and range queries?
> >> > > >
> >> > > >    <!-- 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"/>
> >> > > >
> >> > > >
> >> > > > On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <
> >> > hbase.user.ninad@gmail.com
> >> > > > >wrote:
> >> > > >
> >> > > > > Hi,
> >> > > > > I want certain fields of type int,float and date to be sortable
> and
> >> I
> >> > > > > should
> >> > > > > be able to run my range queries as well as facet queries on
> those
> >> > > fields.
> >> > > > > Now as far as I know sint,sfloat fieldtypes  make the fields
> >> sortable
> >> > > and
> >> > > > > tint,tfloat,tdate allow range queries on the fields.
> >> > > > > I want both these features in my fields. How can I make this
> >> happen?
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
>

Re: Choosing between t and s field types

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Fri, Aug 14, 2009 at 1:15 PM, Ninad Raut<hb...@gmail.com> wrote:
> TrieRange ... what are its features? What additional functionality they
> provide?

- a generally more efficient FieldCache structure (less memory)
- faster range queries when precisionStep is utilized to index
multiple tokens per value

-Yonik
http://www.lucidimagination.com

> On Fri, Aug 14, 2009 at 8:35 PM, Avlesh Singh <av...@gmail.com> wrote:
>
>> >
>> > I just checked and the default schema.xml for SOLR 1.3
>> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.So
>> either
>> > they''re new in 1.4 and I don't know about them or they were manually
>> > defined.
>> >
>> TrieRange fields are new and will make appearance in Solr 1.4. With 1.3 you
>> can use "sint" and "sfloat" for your use cases.
>>
>> @Ninad -
>>
>> http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/
>>
>> Cheers
>> Avlesh
>>
>> On Fri, Aug 14, 2009 at 6:03 PM, Constantijn Visinescu
>> <ba...@gmail.com>wrote:
>>
>> > I just checked and the default schema.xml for SOLR 1.3
>> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.
>> > So either they''re new in 1.4 and I don't know about them or they were
>> > manually defined.
>> >
>> > Can you post your schema.xml entries for tint? (along with any comments
>> it
>> > might have?)
>> >
>> > Constantijn
>> >
>> > On Fri, Aug 14, 2009 at 1:39 PM, Ninad Raut <hbase.user.ninad@gmail.com
>> > >wrote:
>> >
>> > > Hi Constantijn,
>> > > What are the t types viz;tint,tfloat etc. for? Is there a special use
>> of
>> > > these?
>> > >
>> > > On Fri, Aug 14, 2009 at 4:37 PM, Constantijn Visinescu
>> > > <ba...@gmail.com>wrote:
>> > >
>> > > > Accoridng to the documentation in schema.xml.original sint etc can be
>> > > used
>> > > > for both sorting and range queries?
>> > > >
>> > > >    <!-- 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"/>
>> > > >
>> > > >
>> > > > On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <
>> > hbase.user.ninad@gmail.com
>> > > > >wrote:
>> > > >
>> > > > > Hi,
>> > > > > I want certain fields of type int,float and date to be sortable and
>> I
>> > > > > should
>> > > > > be able to run my range queries as well as facet queries on those
>> > > fields.
>> > > > > Now as far as I know sint,sfloat fieldtypes  make the fields
>> sortable
>> > > and
>> > > > > tint,tfloat,tdate allow range queries on the fields.
>> > > > > I want both these features in my fields. How can I make this
>> happen?
>> > > > >
>> > > >
>> > >
>> >
>>
>

Re: Choosing between t and s field types

Posted by Ninad Raut <hb...@gmail.com>.
TrieRange ... what are its features? What additional functionality they
provide?

On Fri, Aug 14, 2009 at 8:35 PM, Avlesh Singh <av...@gmail.com> wrote:

> >
> > I just checked and the default schema.xml for SOLR 1.3
> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.So
> either
> > they''re new in 1.4 and I don't know about them or they were manually
> > defined.
> >
> TrieRange fields are new and will make appearance in Solr 1.4. With 1.3 you
> can use "sint" and "sfloat" for your use cases.
>
> @Ninad -
>
> http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/
>
> Cheers
> Avlesh
>
> On Fri, Aug 14, 2009 at 6:03 PM, Constantijn Visinescu
> <ba...@gmail.com>wrote:
>
> > I just checked and the default schema.xml for SOLR 1.3
> > (solr/conf/schema.xml.original) and i don't see tint, etc listed.
> > So either they''re new in 1.4 and I don't know about them or they were
> > manually defined.
> >
> > Can you post your schema.xml entries for tint? (along with any comments
> it
> > might have?)
> >
> > Constantijn
> >
> > On Fri, Aug 14, 2009 at 1:39 PM, Ninad Raut <hbase.user.ninad@gmail.com
> > >wrote:
> >
> > > Hi Constantijn,
> > > What are the t types viz;tint,tfloat etc. for? Is there a special use
> of
> > > these?
> > >
> > > On Fri, Aug 14, 2009 at 4:37 PM, Constantijn Visinescu
> > > <ba...@gmail.com>wrote:
> > >
> > > > Accoridng to the documentation in schema.xml.original sint etc can be
> > > used
> > > > for both sorting and range queries?
> > > >
> > > >    <!-- 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"/>
> > > >
> > > >
> > > > On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <
> > hbase.user.ninad@gmail.com
> > > > >wrote:
> > > >
> > > > > Hi,
> > > > > I want certain fields of type int,float and date to be sortable and
> I
> > > > > should
> > > > > be able to run my range queries as well as facet queries on those
> > > fields.
> > > > > Now as far as I know sint,sfloat fieldtypes  make the fields
> sortable
> > > and
> > > > > tint,tfloat,tdate allow range queries on the fields.
> > > > > I want both these features in my fields. How can I make this
> happen?
> > > > >
> > > >
> > >
> >
>

Re: Choosing between t and s field types

Posted by Avlesh Singh <av...@gmail.com>.
>
> I just checked and the default schema.xml for SOLR 1.3
> (solr/conf/schema.xml.original) and i don't see tint, etc listed.So either
> they''re new in 1.4 and I don't know about them or they were manually
> defined.
>
TrieRange fields are new and will make appearance in Solr 1.4. With 1.3 you
can use "sint" and "sfloat" for your use cases.

@Ninad -
http://www.lucidimagination.com/blog/2009/05/13/exploring-lucene-and-solrs-trierange-capabilities/

Cheers
Avlesh

On Fri, Aug 14, 2009 at 6:03 PM, Constantijn Visinescu
<ba...@gmail.com>wrote:

> I just checked and the default schema.xml for SOLR 1.3
> (solr/conf/schema.xml.original) and i don't see tint, etc listed.
> So either they''re new in 1.4 and I don't know about them or they were
> manually defined.
>
> Can you post your schema.xml entries for tint? (along with any comments it
> might have?)
>
> Constantijn
>
> On Fri, Aug 14, 2009 at 1:39 PM, Ninad Raut <hbase.user.ninad@gmail.com
> >wrote:
>
> > Hi Constantijn,
> > What are the t types viz;tint,tfloat etc. for? Is there a special use of
> > these?
> >
> > On Fri, Aug 14, 2009 at 4:37 PM, Constantijn Visinescu
> > <ba...@gmail.com>wrote:
> >
> > > Accoridng to the documentation in schema.xml.original sint etc can be
> > used
> > > for both sorting and range queries?
> > >
> > >    <!-- 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"/>
> > >
> > >
> > > On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <
> hbase.user.ninad@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > > I want certain fields of type int,float and date to be sortable and I
> > > > should
> > > > be able to run my range queries as well as facet queries on those
> > fields.
> > > > Now as far as I know sint,sfloat fieldtypes  make the fields sortable
> > and
> > > > tint,tfloat,tdate allow range queries on the fields.
> > > > I want both these features in my fields. How can I make this happen?
> > > >
> > >
> >
>

Re: Choosing between t and s field types

Posted by Constantijn Visinescu <ba...@gmail.com>.
I just checked and the default schema.xml for SOLR 1.3
(solr/conf/schema.xml.original) and i don't see tint, etc listed.
So either they''re new in 1.4 and I don't know about them or they were
manually defined.

Can you post your schema.xml entries for tint? (along with any comments it
might have?)

Constantijn

On Fri, Aug 14, 2009 at 1:39 PM, Ninad Raut <hb...@gmail.com>wrote:

> Hi Constantijn,
> What are the t types viz;tint,tfloat etc. for? Is there a special use of
> these?
>
> On Fri, Aug 14, 2009 at 4:37 PM, Constantijn Visinescu
> <ba...@gmail.com>wrote:
>
> > Accoridng to the documentation in schema.xml.original sint etc can be
> used
> > for both sorting and range queries?
> >
> >    <!-- 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"/>
> >
> >
> > On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <hbase.user.ninad@gmail.com
> > >wrote:
> >
> > > Hi,
> > > I want certain fields of type int,float and date to be sortable and I
> > > should
> > > be able to run my range queries as well as facet queries on those
> fields.
> > > Now as far as I know sint,sfloat fieldtypes  make the fields sortable
> and
> > > tint,tfloat,tdate allow range queries on the fields.
> > > I want both these features in my fields. How can I make this happen?
> > >
> >
>

Re: Choosing between t and s field types

Posted by Ninad Raut <hb...@gmail.com>.
Hi Constantijn,
What are the t types viz;tint,tfloat etc. for? Is there a special use of
these?

On Fri, Aug 14, 2009 at 4:37 PM, Constantijn Visinescu
<ba...@gmail.com>wrote:

> Accoridng to the documentation in schema.xml.original sint etc can be used
> for both sorting and range queries?
>
>    <!-- 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"/>
>
>
> On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <hbase.user.ninad@gmail.com
> >wrote:
>
> > Hi,
> > I want certain fields of type int,float and date to be sortable and I
> > should
> > be able to run my range queries as well as facet queries on those fields.
> > Now as far as I know sint,sfloat fieldtypes  make the fields sortable and
> > tint,tfloat,tdate allow range queries on the fields.
> > I want both these features in my fields. How can I make this happen?
> >
>

Re: Choosing between t and s field types

Posted by Constantijn Visinescu <ba...@gmail.com>.
Accoridng to the documentation in schema.xml.original sint etc can be used
for both sorting and range queries?

    <!-- 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"/>


On Fri, Aug 14, 2009 at 11:08 AM, Ninad Raut <hb...@gmail.com>wrote:

> Hi,
> I want certain fields of type int,float and date to be sortable and I
> should
> be able to run my range queries as well as facet queries on those fields.
> Now as far as I know sint,sfloat fieldtypes  make the fields sortable and
> tint,tfloat,tdate allow range queries on the fields.
> I want both these features in my fields. How can I make this happen?
>