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 Tiernan OToole <ls...@gmail.com> on 2011/10/26 13:08:15 UTC
MultiValued fields and Facets...
Good morning all.
I am currently indexing about 11 million records, and would like to add
facating to the results page. I have tweaked the query string to include
facating, but i am not getting anything back.
an Example Query string (slightly modified) is as follows:
http://localhost:8080/solr/select?indent=on&version=2.2&q=*:*&fq=&start=0&rows=10&fl=*%2Cscore&qt=&wt=json&explainOther=&hl.fl=&facet=on&facet.field=Category&facet.field=Warehouse
the Category and Warehouse fields are multivalue fields...
the results i get are as follows:
"facet_counts":{
"facet_queries":{},
"facet_fields":{
"Category":[],
"Warehouse":[]},
"facet_dates":{},
"facet_ranges":{}}}
the data i am sending in has mutliple values for Category and Warehouse. I
did read that this was not available in Solr 1.3 or 1.4... I am currently
running Solr 3.4, and its not working... Would it work if i went to solr 4,
or am i doing something wrong here?
Thanks in advance.
--
Tiernan O'Toole
blog.lotas-smartman.net
www.geekphotographer.com
www.tiernanotoole.ie
Re: MultiValued fields and Facets...
Posted by Tiernan OToole <ls...@gmail.com>.
I have figured out what was wrong... The field Warehouse was not marked as
indexed... It was being stored, but not indexed... It is now working as
expected.
Thanks.
--Tiernan
On Wed, Oct 26, 2011 at 1:01 PM, Tiernan OToole <ls...@gmail.com> wrote:
> Ok, so now i am getting something back, but still getting "odd" results...
>
> I actually made a mistake in the first question... Category is
> MultiValued, but Warehouse is not... So, when i run the query, you
> sugested, Category comes back with facets and counts, which is one step
> closer to where i want to be, but Warehouse, which as i mentioned is a
> single valued result, is not... If i just facet on either Category, i get
> the results, but just faceting on Warehouse still gets me nothing...
>
> Very confused now...
>
> --Tiernan
>
>
> On Wed, Oct 26, 2011 at 12:53 PM, Erik Hatcher <er...@gmail.com>wrote:
>
>> That URL has several oddities to it... empty fq and qt parameters. Try
>> simply ?q=*:*&facet=on&facet.field=Category&facet.field=Warehouse and see
>> if that helps.
>>
>> Erik
>>
>> On Oct 26, 2011, at 07:08 , Tiernan OToole wrote:
>>
>> > Good morning all.
>> >
>> > I am currently indexing about 11 million records, and would like to add
>> > facating to the results page. I have tweaked the query string to include
>> > facating, but i am not getting anything back.
>> >
>> > an Example Query string (slightly modified) is as follows:
>> >
>> >
>> http://localhost:8080/solr/select?indent=on&version=2.2&q=*:*&fq=&start=0&rows=10&fl=*%2Cscore&qt=&wt=json&explainOther=&hl.fl=&facet=on&facet.field=Category&facet.field=Warehouse
>> >
>> > the Category and Warehouse fields are multivalue fields...
>> >
>> > the results i get are as follows:
>> >
>> > "facet_counts":{
>> > "facet_queries":{},
>> > "facet_fields":{
>> > "Category":[],
>> > "Warehouse":[]},
>> > "facet_dates":{},
>> > "facet_ranges":{}}}
>> >
>> > the data i am sending in has mutliple values for Category and
>> Warehouse. I
>> > did read that this was not available in Solr 1.3 or 1.4... I am
>> currently
>> > running Solr 3.4, and its not working... Would it work if i went to
>> solr 4,
>> > or am i doing something wrong here?
>> >
>> > Thanks in advance.
>> >
>> > --
>> > Tiernan O'Toole
>> > blog.lotas-smartman.net
>> > www.geekphotographer.com
>> > www.tiernanotoole.ie
>>
>>
>
>
> --
> Tiernan O'Toole
> blog.lotas-smartman.net
> www.geekphotographer.com
> www.tiernanotoole.ie
>
--
Tiernan O'Toole
blog.lotas-smartman.net
www.geekphotographer.com
www.tiernanotoole.ie
Re: MultiValued fields and Facets...
Posted by Tiernan OToole <ls...@gmail.com>.
Ok, so now i am getting something back, but still getting "odd" results...
I actually made a mistake in the first question... Category is MultiValued,
but Warehouse is not... So, when i run the query, you sugested, Category
comes back with facets and counts, which is one step closer to where i want
to be, but Warehouse, which as i mentioned is a single valued result, is
not... If i just facet on either Category, i get the results, but just
faceting on Warehouse still gets me nothing...
Very confused now...
--Tiernan
On Wed, Oct 26, 2011 at 12:53 PM, Erik Hatcher <er...@gmail.com>wrote:
> That URL has several oddities to it... empty fq and qt parameters. Try
> simply ?q=*:*&facet=on&facet.field=Category&facet.field=Warehouse and see if
> that helps.
>
> Erik
>
> On Oct 26, 2011, at 07:08 , Tiernan OToole wrote:
>
> > Good morning all.
> >
> > I am currently indexing about 11 million records, and would like to add
> > facating to the results page. I have tweaked the query string to include
> > facating, but i am not getting anything back.
> >
> > an Example Query string (slightly modified) is as follows:
> >
> >
> http://localhost:8080/solr/select?indent=on&version=2.2&q=*:*&fq=&start=0&rows=10&fl=*%2Cscore&qt=&wt=json&explainOther=&hl.fl=&facet=on&facet.field=Category&facet.field=Warehouse
> >
> > the Category and Warehouse fields are multivalue fields...
> >
> > the results i get are as follows:
> >
> > "facet_counts":{
> > "facet_queries":{},
> > "facet_fields":{
> > "Category":[],
> > "Warehouse":[]},
> > "facet_dates":{},
> > "facet_ranges":{}}}
> >
> > the data i am sending in has mutliple values for Category and Warehouse.
> I
> > did read that this was not available in Solr 1.3 or 1.4... I am currently
> > running Solr 3.4, and its not working... Would it work if i went to solr
> 4,
> > or am i doing something wrong here?
> >
> > Thanks in advance.
> >
> > --
> > Tiernan O'Toole
> > blog.lotas-smartman.net
> > www.geekphotographer.com
> > www.tiernanotoole.ie
>
>
--
Tiernan O'Toole
blog.lotas-smartman.net
www.geekphotographer.com
www.tiernanotoole.ie
Re: MultiValued fields and Facets...
Posted by Erik Hatcher <er...@gmail.com>.
That URL has several oddities to it... empty fq and qt parameters. Try simply ?q=*:*&facet=on&facet.field=Category&facet.field=Warehouse and see if that helps.
Erik
On Oct 26, 2011, at 07:08 , Tiernan OToole wrote:
> Good morning all.
>
> I am currently indexing about 11 million records, and would like to add
> facating to the results page. I have tweaked the query string to include
> facating, but i am not getting anything back.
>
> an Example Query string (slightly modified) is as follows:
>
> http://localhost:8080/solr/select?indent=on&version=2.2&q=*:*&fq=&start=0&rows=10&fl=*%2Cscore&qt=&wt=json&explainOther=&hl.fl=&facet=on&facet.field=Category&facet.field=Warehouse
>
> the Category and Warehouse fields are multivalue fields...
>
> the results i get are as follows:
>
> "facet_counts":{
> "facet_queries":{},
> "facet_fields":{
> "Category":[],
> "Warehouse":[]},
> "facet_dates":{},
> "facet_ranges":{}}}
>
> the data i am sending in has mutliple values for Category and Warehouse. I
> did read that this was not available in Solr 1.3 or 1.4... I am currently
> running Solr 3.4, and its not working... Would it work if i went to solr 4,
> or am i doing something wrong here?
>
> Thanks in advance.
>
> --
> Tiernan O'Toole
> blog.lotas-smartman.net
> www.geekphotographer.com
> www.tiernanotoole.ie