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 Steven White <sw...@gmail.com> on 2016/05/03 18:16:21 UTC

solr.StrField or solr.StringField?

Hi Everyone,

Is solr.StrField and solr.StringField the same thing?

Thanks in advanced!

Steve

Re: solr.StrField or solr.StringField?

Posted by John Bickerstaff <jo...@johnbickerstaff.com>.
You'll note that the "name" of the field in schema.xml is "string" and the
class is solr.StrField.

Easy to get confused when you're writing something up quickly... in a sense
the "string" field IS a solr.StrField

... but I could be wrong of course.

<fieldType name="string" class="solr.StrField" sortMissingLast="true" />

On Tue, May 3, 2016 at 2:14 PM, John Bickerstaff <jo...@johnbickerstaff.com>
wrote:

> I'm assuming it's another "class" or data type that someone built - but
> I'm afraid I don't know any more than that.
>
> An alternative possibility (supported by at least one of the links on that
> page you linked) is that it's just a typo -- people typing quickly and
> forgetting the exact (truncated) spelling of the field.
>
> In that case, it's talking about using it for faceting and IIRC, you want
> a non-analyzed field for that - preserve it exactly as it is for facet
> queries -- that suggests to me that the author actually meant StrField
>
> <begin quote>
>
> I might want to index the same data differently in three different fields
> (perhaps using the Solr copyField
> <http://wiki.apache.org/solr/SchemaXml#Copy_Fields> directive):
>
>    - For searching: Tokenized, case-folded, punctuation-stripped:
>       - schildt / herbert / wolpert / lewis / davies / p
>    - For sorting: Untokenized, case-folded, punctuation-stripped:
>       - schildt herbert wolpert lewis davies p
>    -
>
>    For faceting: Primary author only, using a solr.StringField:
>    - Schildt, Herbert
>
> Then when the user drills down on the "Schildt, Herbert" string I would
> reissue the query with an added fq=author:"Schild, Herbert" parameter.
>
> On Tue, May 3, 2016 at 2:01 PM, Steven White <sw...@gmail.com> wrote:
>
>> Thanks John.
>>
>> Yes, the out-of-the-box schema.xml does not have solr.StringField.
>> However, a number of Solr pages on the web mention solr.StringField [1]
>> and
>> thus I'm not sure if that's a typo, a real thing and such it is missing
>> from the official Solr wiki's.
>>
>> Steve
>>
>> [1] https://wiki.apache.org/solr/SolrFacetingOverview,
>>
>> http://grokbase.com/t/lucene/solr-commits/06cw5038rk/solr-wiki-update-of-solrfacetingoverview-by-jjlarrea
>> ,
>>
>> On Tue, May 3, 2016 at 3:35 PM, John Bickerstaff <
>> john@johnbickerstaff.com>
>> wrote:
>>
>> > My default schema.xml does not have an entry for solr.StringField so I
>> > can't tell you what that one does.
>> >
>> > If you look for solr.StrField in the schema.xml file, you'll get some
>> idea
>> > of how it's defined.  The default setting is for it not to be analyzed.
>> >
>> > On Tue, May 3, 2016 at 10:16 AM, Steven White <sw...@gmail.com>
>> > wrote:
>> >
>> > > Hi Everyone,
>> > >
>> > > Is solr.StrField and solr.StringField the same thing?
>> > >
>> > > Thanks in advanced!
>> > >
>> > > Steve
>> > >
>> >
>>
>
>

Re: solr.StrField or solr.StringField?

Posted by Erick Erickson <er...@gmail.com>.
Not a typo any more, Shawn fixed it today.




On Tue, May 3, 2016 at 1:34 PM, Jack Krupansky <ja...@gmail.com> wrote:
> Yeah, that's a typo. The same typo is in the official Solr Reference Guide:
> https://cwiki.apache.org/confluence/display/solr/Putting+the+Pieces+Together
>
> [ATTN: Solr Ref Guide Team!]
>
>
> -- Jack Krupansky
>
> On Tue, May 3, 2016 at 4:14 PM, John Bickerstaff <jo...@johnbickerstaff.com>
> wrote:
>
>> I'm assuming it's another "class" or data type that someone built - but I'm
>> afraid I don't know any more than that.
>>
>> An alternative possibility (supported by at least one of the links on that
>> page you linked) is that it's just a typo -- people typing quickly and
>> forgetting the exact (truncated) spelling of the field.
>>
>> In that case, it's talking about using it for faceting and IIRC, you want a
>> non-analyzed field for that - preserve it exactly as it is for facet
>> queries -- that suggests to me that the author actually meant StrField
>>
>> <begin quote>
>>
>> I might want to index the same data differently in three different fields
>> (perhaps using the Solr copyField
>> <http://wiki.apache.org/solr/SchemaXml#Copy_Fields> directive):
>>
>>    - For searching: Tokenized, case-folded, punctuation-stripped:
>>       - schildt / herbert / wolpert / lewis / davies / p
>>    - For sorting: Untokenized, case-folded, punctuation-stripped:
>>       - schildt herbert wolpert lewis davies p
>>    -
>>
>>    For faceting: Primary author only, using a solr.StringField:
>>    - Schildt, Herbert
>>
>> Then when the user drills down on the "Schildt, Herbert" string I would
>> reissue the query with an added fq=author:"Schild, Herbert" parameter.
>>
>> On Tue, May 3, 2016 at 2:01 PM, Steven White <sw...@gmail.com> wrote:
>>
>> > Thanks John.
>> >
>> > Yes, the out-of-the-box schema.xml does not have solr.StringField.
>> > However, a number of Solr pages on the web mention solr.StringField [1]
>> and
>> > thus I'm not sure if that's a typo, a real thing and such it is missing
>> > from the official Solr wiki's.
>> >
>> > Steve
>> >
>> > [1] https://wiki.apache.org/solr/SolrFacetingOverview,
>> >
>> >
>> http://grokbase.com/t/lucene/solr-commits/06cw5038rk/solr-wiki-update-of-solrfacetingoverview-by-jjlarrea
>> > ,
>> >
>> > On Tue, May 3, 2016 at 3:35 PM, John Bickerstaff <
>> john@johnbickerstaff.com
>> > >
>> > wrote:
>> >
>> > > My default schema.xml does not have an entry for solr.StringField so I
>> > > can't tell you what that one does.
>> > >
>> > > If you look for solr.StrField in the schema.xml file, you'll get some
>> > idea
>> > > of how it's defined.  The default setting is for it not to be analyzed.
>> > >
>> > > On Tue, May 3, 2016 at 10:16 AM, Steven White <sw...@gmail.com>
>> > > wrote:
>> > >
>> > > > Hi Everyone,
>> > > >
>> > > > Is solr.StrField and solr.StringField the same thing?
>> > > >
>> > > > Thanks in advanced!
>> > > >
>> > > > Steve
>> > > >
>> > >
>> >
>>

Re: solr.StrField or solr.StringField?

Posted by Jack Krupansky <ja...@gmail.com>.
Yeah, that's a typo. The same typo is in the official Solr Reference Guide:
https://cwiki.apache.org/confluence/display/solr/Putting+the+Pieces+Together

[ATTN: Solr Ref Guide Team!]


-- Jack Krupansky

On Tue, May 3, 2016 at 4:14 PM, John Bickerstaff <jo...@johnbickerstaff.com>
wrote:

> I'm assuming it's another "class" or data type that someone built - but I'm
> afraid I don't know any more than that.
>
> An alternative possibility (supported by at least one of the links on that
> page you linked) is that it's just a typo -- people typing quickly and
> forgetting the exact (truncated) spelling of the field.
>
> In that case, it's talking about using it for faceting and IIRC, you want a
> non-analyzed field for that - preserve it exactly as it is for facet
> queries -- that suggests to me that the author actually meant StrField
>
> <begin quote>
>
> I might want to index the same data differently in three different fields
> (perhaps using the Solr copyField
> <http://wiki.apache.org/solr/SchemaXml#Copy_Fields> directive):
>
>    - For searching: Tokenized, case-folded, punctuation-stripped:
>       - schildt / herbert / wolpert / lewis / davies / p
>    - For sorting: Untokenized, case-folded, punctuation-stripped:
>       - schildt herbert wolpert lewis davies p
>    -
>
>    For faceting: Primary author only, using a solr.StringField:
>    - Schildt, Herbert
>
> Then when the user drills down on the "Schildt, Herbert" string I would
> reissue the query with an added fq=author:"Schild, Herbert" parameter.
>
> On Tue, May 3, 2016 at 2:01 PM, Steven White <sw...@gmail.com> wrote:
>
> > Thanks John.
> >
> > Yes, the out-of-the-box schema.xml does not have solr.StringField.
> > However, a number of Solr pages on the web mention solr.StringField [1]
> and
> > thus I'm not sure if that's a typo, a real thing and such it is missing
> > from the official Solr wiki's.
> >
> > Steve
> >
> > [1] https://wiki.apache.org/solr/SolrFacetingOverview,
> >
> >
> http://grokbase.com/t/lucene/solr-commits/06cw5038rk/solr-wiki-update-of-solrfacetingoverview-by-jjlarrea
> > ,
> >
> > On Tue, May 3, 2016 at 3:35 PM, John Bickerstaff <
> john@johnbickerstaff.com
> > >
> > wrote:
> >
> > > My default schema.xml does not have an entry for solr.StringField so I
> > > can't tell you what that one does.
> > >
> > > If you look for solr.StrField in the schema.xml file, you'll get some
> > idea
> > > of how it's defined.  The default setting is for it not to be analyzed.
> > >
> > > On Tue, May 3, 2016 at 10:16 AM, Steven White <sw...@gmail.com>
> > > wrote:
> > >
> > > > Hi Everyone,
> > > >
> > > > Is solr.StrField and solr.StringField the same thing?
> > > >
> > > > Thanks in advanced!
> > > >
> > > > Steve
> > > >
> > >
> >
>

Re: solr.StrField or solr.StringField?

Posted by John Bickerstaff <jo...@johnbickerstaff.com>.
I'm assuming it's another "class" or data type that someone built - but I'm
afraid I don't know any more than that.

An alternative possibility (supported by at least one of the links on that
page you linked) is that it's just a typo -- people typing quickly and
forgetting the exact (truncated) spelling of the field.

In that case, it's talking about using it for faceting and IIRC, you want a
non-analyzed field for that - preserve it exactly as it is for facet
queries -- that suggests to me that the author actually meant StrField

<begin quote>

I might want to index the same data differently in three different fields
(perhaps using the Solr copyField
<http://wiki.apache.org/solr/SchemaXml#Copy_Fields> directive):

   - For searching: Tokenized, case-folded, punctuation-stripped:
      - schildt / herbert / wolpert / lewis / davies / p
   - For sorting: Untokenized, case-folded, punctuation-stripped:
      - schildt herbert wolpert lewis davies p
   -

   For faceting: Primary author only, using a solr.StringField:
   - Schildt, Herbert

Then when the user drills down on the "Schildt, Herbert" string I would
reissue the query with an added fq=author:"Schild, Herbert" parameter.

On Tue, May 3, 2016 at 2:01 PM, Steven White <sw...@gmail.com> wrote:

> Thanks John.
>
> Yes, the out-of-the-box schema.xml does not have solr.StringField.
> However, a number of Solr pages on the web mention solr.StringField [1] and
> thus I'm not sure if that's a typo, a real thing and such it is missing
> from the official Solr wiki's.
>
> Steve
>
> [1] https://wiki.apache.org/solr/SolrFacetingOverview,
>
> http://grokbase.com/t/lucene/solr-commits/06cw5038rk/solr-wiki-update-of-solrfacetingoverview-by-jjlarrea
> ,
>
> On Tue, May 3, 2016 at 3:35 PM, John Bickerstaff <john@johnbickerstaff.com
> >
> wrote:
>
> > My default schema.xml does not have an entry for solr.StringField so I
> > can't tell you what that one does.
> >
> > If you look for solr.StrField in the schema.xml file, you'll get some
> idea
> > of how it's defined.  The default setting is for it not to be analyzed.
> >
> > On Tue, May 3, 2016 at 10:16 AM, Steven White <sw...@gmail.com>
> > wrote:
> >
> > > Hi Everyone,
> > >
> > > Is solr.StrField and solr.StringField the same thing?
> > >
> > > Thanks in advanced!
> > >
> > > Steve
> > >
> >
>

Re: solr.StrField or solr.StringField?

Posted by Steven White <sw...@gmail.com>.
Thanks John.

Yes, the out-of-the-box schema.xml does not have solr.StringField.
However, a number of Solr pages on the web mention solr.StringField [1] and
thus I'm not sure if that's a typo, a real thing and such it is missing
from the official Solr wiki's.

Steve

[1] https://wiki.apache.org/solr/SolrFacetingOverview,
http://grokbase.com/t/lucene/solr-commits/06cw5038rk/solr-wiki-update-of-solrfacetingoverview-by-jjlarrea
,

On Tue, May 3, 2016 at 3:35 PM, John Bickerstaff <jo...@johnbickerstaff.com>
wrote:

> My default schema.xml does not have an entry for solr.StringField so I
> can't tell you what that one does.
>
> If you look for solr.StrField in the schema.xml file, you'll get some idea
> of how it's defined.  The default setting is for it not to be analyzed.
>
> On Tue, May 3, 2016 at 10:16 AM, Steven White <sw...@gmail.com>
> wrote:
>
> > Hi Everyone,
> >
> > Is solr.StrField and solr.StringField the same thing?
> >
> > Thanks in advanced!
> >
> > Steve
> >
>

Re: solr.StrField or solr.StringField?

Posted by John Bickerstaff <jo...@johnbickerstaff.com>.
My default schema.xml does not have an entry for solr.StringField so I
can't tell you what that one does.

If you look for solr.StrField in the schema.xml file, you'll get some idea
of how it's defined.  The default setting is for it not to be analyzed.

On Tue, May 3, 2016 at 10:16 AM, Steven White <sw...@gmail.com> wrote:

> Hi Everyone,
>
> Is solr.StrField and solr.StringField the same thing?
>
> Thanks in advanced!
>
> Steve
>