Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: ruby-dev
apply facet.query feature on Flare
 

Index | Next | Previous | View Flat


koji at r

Oct 27, 2007, 9:51 PM


Views: 2421
Permalink
apply facet.query feature on Flare

Hi,

I'm starting to use Flare. I like the idea of @flare is a user session.

Thanks to CoC of Flare, if I have *_facet fields, I can
have a faceting feature on my application very easily.

Please see the following demo:

http://www.rondhuit-demo.com/yademo/

The demo uses Japanese commercial goods data instead of Flare library data.

Now I want to apply facet.query feature to the demo.
To test it, I generated browse2_controller.rb as follows:

class Browse2Controller < ApplicationController
flare
def index
@results_per_page = 10

# name => {:queries => [], :filters => []}
@flare.facet_queries = {
'-49.99'=>{:queries=>['price:[0 TO 49.99]'],:filters=>[]},
'50-99.99'=>{:queries=>['price:[50 TO 99.99]'],:filters=>[]},
'100-99.99'=>{:queries=>['price:[100 TO 299.99]'],:filters=>[]},
'300-'=>{:queries=>['price:[300 TO *]'],:filters=>[]}
}

if params[:page]
@flare.page = params[:page].to_i
end

@start = (@flare.page - 1) * @results_per_page

@response = @flare.search(@start, @results_per_page)
end
end

But no success. When I access browse2/index.rhtml,
WEBrick forwards the request to Solr, and Solr log was:

/select wt=ruby&facet.limit=20&rows=10&start=0&facet=true&facet.mincount=1
&q=*:*&fl=*,score&qt=standard&facet.query=()&facet.query=()&facet.query=()&facet
.query=()&facet.field=category_facet&facet.field=name_facet&fq=category_facet:"e
lectronics"&hl=true&facet.sort=true 0 60

How can I use facet.query feature on Flare?

Thanks in advance,

Koji

Subject User Time
apply facet.query feature on Flare koji at r Oct 27, 2007, 9:51 PM
    Re: apply facet.query feature on Flare erik at ehatchersolutions Oct 28, 2007, 7:44 AM
    Re: apply facet.query feature on Flare koji at r Oct 29, 2007, 6:03 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.