Am 29.03.2009 um 15:44 schrieb Pat Allan:

>
> Okay, let's drop it back another level - no Thinking Sphinx, but using
> Ruby via Riddle to talk to Sphinx. Within script/console:
>
> client = Riddle::Client.new "localhost", 3312

=> #<Riddle::Client:0x19d7dac @group_clause="@group desc", @offset=0,  
@queue=[], @rank_mode=:proximity_bm25, @id_range=0..0, @limit=20,  
@retry_count=0, @match_mode=:all, @group_function=:day,  
@server="localhost", @timeout=0, @index_weights={}, @weights=[],  
@cut_off=0, @max_matches=1000, @field_weights={}, @group_by="",  
@anchor={}, @sort_by="", @group_distinct="", @port=331,  
@max_query_time=0, @filters=[], @retry_delay=0, @sort_mode=:relevance>
 >>

>
> client.match_mode = :extended

=> :extended

>
> client.query("fusbal", "product_core")[:matches]

=> []


> client.query("bayern", "product_core")[:matches]

 >> client.query("bayern", "product_core")[:matches]
=> [{:attributes=>{"description_sort"=>31921,  
"order_number_sort"=>22012, "taggings_ids"=>[77],  
"kadisnr_sort"=>8004, "sphinx_deleted"=>0,  
"subclass_crcs"=>[485965105], "class_crc"=>485965105,  
"product_comments_ids"=>[], "boost_sort"=>37484,  
"sphinx_internal_id"=>813,  
"kadis_product_sort"=>10546}, :index=>0, :weight=>2713,


Seems to be a problem with "fusbal" !!!



>
>
> -- 
> Pat
>
> On 30/03/2009, at 12:39 AM, Jochen Kaechelin wrote:
>
>>
>>
>> Am 29.03.2009 um 15:28 schrieb Pat Allan:
>>
>>>
>>> Okay, let's strip it back to the minimum. What's the output of the
>>> following in script/console:
>>>
>>> Product.search "fusbal"
>>
>> bullet:quamm bullet$ script/console
>> Loading development environment (Rails 2.3.2)
>>>> Product.search "fusbal"
>> => []
>>>>
>>
>>>
>>> And if we add some complexity...
>>>
>>> Product.search "fusbal",
>>>   :with       => {:active => 1},
>>>   :match_mode => :extended
>>>
>>
>>>> Product.search "fusbal", :with => {:active =>1}, :match_mode
>> => :extended
>> => []
>>>>
>>
>> Searching for the correct word (fussball):
>>
>>>> Product.search "fussball", :with => {:active =>1}, :match_mode
>> => :extended
>> => [#<Product id: 813, worker_id: 99999, brand_id: 1, kadisnr:
>> "112335", order_number: "GT2739", kadis_product: " Zucker-Fussball-
>> Elf, gemischt", description: "B: 30 / H 41 mm", day_special_date:  
>> nil,
>> day_special_price: nil, hide_at: nil, visible_at: nil, delta: false,
>> boost: "0", active: true, available_at: nil, created_at: "2009-03-16
>> 15:36:04", updated_at: "2009-03-20 02:31:02", recommend: false>,
>> #<Product id: 9074, worker_id: 99999, brand_id: 1, kadisnr: "113999",
>> order_number: "GT2739-24", kadis_product: " Zucker-Fussball-Elf,
>> gemischt", description: "B: 30 / H 41 mm", day_special_date: nil,
>> day_special_price: nil,
>>
>> ...
>>
>> searchd.query.log:
>>
>> [Sun Mar 29 15:38:11.341 2009] 0.002 sec [ext/3/rel 0 (0,20)] [*]
>> fusbal
>> [Sun Mar 29 15:38:11.341 2009] 0.002 sec [ext/3/rel 0 (0,20)] [*]
>> fusbal
>> [Sun Mar 29 15:38:40.058 2009] 0.045 sec [ext/3/rel 19 (0,20)] [*]
>> fussball
>>
>>
>>> -- 
>>> Pat
>>>
>>> On 29/03/2009, at 11:51 PM, Jochen Kaechelin wrote:
>>>
>>>>
>>>>
>>>> Am 29.03.2009 um 14:48 schrieb Pat Allan:
>>>>
>>>>>
>>>>> Okay, that seems to be working (that's the result you're  
>>>>> expecting,
>>>>> yes?).
>>>>
>>>> Yes - exactly what I'am looking for.
>>>>
>>>>> Just to confirm, what's the line of code in Ruby when you're
>>>>> searching for fusball?
>>>>>
>>>>
>>>> @products = Product.search params[:query]+"*",
>>>>        :conditions => { :active => 1 },
>>>>        :match_mode => :extended2,
>>>>        :page => params[:page],
>>>>        :per_page => 20,
>>>>        :field_weights => { :boost => 200, :kadis_product =>
>>>> 100, :description => 10 },
>>>>        :include => :taggings
>>>>
>>>>
>>>>
>>>>>
>>>
>>>
>>>>
>>
>>
>>>
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to