Displaying 17 results from an estimated 17 matches for "process_query".
2007 May 03
1
Numeric Range or comparision doesn''t work
...gt; 10, :data => "yes"},
{:num => 10, :data => "no"},
{:num => 100, :data => "yes"},
{:num => 100, :data => "no"},
{:num => 1000, :data => "yes"},
{:num => 1000, :data => "no"}
]
?> puts index.process_query(''data:yes AND num:[10 100]'')
+data:yes +num:[10 100]
=> nil
>> puts index.search(''d:data:yes AND num:[10 100]'')
TopDocs: total_hits = 2, max_score = 1.777895 [
2 "": 1.777895
4 "": 1.777895
]
=> nil
>>...
2006 Sep 08
8
Ferret-0.10.3 released
...ll as adding the two
separate terms. So "set-up" becomes "setup", "set", "up" so searches
for "set-up", "setup" or just plain "set" will all match. This filter
is also applied to the StandardAnalyzer.
I''ve also made the process_query method in Index::Index public. Before
anyone asks, the reason it is process_query and not parse_query is
that it accepts strings or query objects and may also optimize queries
in future.
Have at it,
Dave
2008 Mar 05
0
Index Searcher Causes GC Memory Error: "irb: double free or corruption"
...wants doc_id [Integer]
def doc(doc_id)
return self.searcher[doc_id]
rescue Exception => e
puts "** IndexSearcher(#{object_type}).doc #{doc_id}\n" << e.backtrace.join("\n")
return nil
end
alias :[] :doc
#############################
# Querying methods
def process_query(query)
query.is_a?(Ferret::Search::Query) ? query : SearchIndex::QUERY_PARSER.parse(query)
end
def search(query, options = {})
query_obj = process_query(query)
self.searcher.search( query_obj, options )
end
def search_each (query, options = {})
query_obj = process_query(query)
self....
2007 Apr 13
4
[Ferret] QueryParser memory leak bug (Joyent/OpenSolaris)
...ubygems''
irb(main):003:0> require ''ferret''
irb(main):004:0> include Ferret
irb(main):005:0> index = Index::Index.new
irb(main):008:0> index << "something"
# Now the error while processing "bol?"
irb(main):009:0> query = index.process_query("bo\303\264")
/opt/csw/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:749:in
`parse'': failed to allocate memory (NoMemoryError)
from
/opt/csw/lib/ruby/gems/1.8/gems/ferret-0.11.4/lib/ferret/index.rb:749:in
`do_process_query''
from
/opt/csw/lib/ruby/gems/1.8/gems...
2006 Sep 12
3
Querying against numeric fields? e.g. price:( >= min_price)
Using acts_as_ferret I''m trying to do a query like:
active:(true) title|body:(#{params[:s]}) product_price:( >=
#{params[:min]})
Where I want to return only the active products that contain the search
term in the title or body and has a minimum price >= params[:min]
I''m finding that even though I''m indexing the product price as an
integer (so no .00 to cause
2007 Sep 24
2
ferret fuzzy matches
Hi guys,
Is there some way of getting ferret matches string, when i do a fuzzy
search?
The scenario is this:
1. The user search for ''show''
2. Nothing was found
3. So I do a fuzzy search, passing ''show~''
4. It gives me somes results, most of all was matched with ''showcase''
5. So I want to tell the user that: Nothing was found with
2013 Sep 22
2
[LLVMdev] Bad permissions for mapped region
...pp:561)
==27130== by 0xA25EA99: llvm::MCJIT::finalizeObject() (MCJIT.cpp:173)
==27130== by 0xAB57918: LLVMGetPointerToGlobal
(ExecutionEngineBindings.cpp:332)
==27130== by 0x4E4813D: compile_query (ql.c:2286)
==27130== by 0x4E4836A: tusto_ql_compile (ql.c:2322)
==27130== by 0x402D19: process_query (ts_util.c:167)
==27130== by 0x403205: run_shell (ts_util.c:296)
I have source tree checked out at f46e5eadc307beaef6e8dd0602bb4c63ca41fd50.
To create MCJIT i use provided llvm-c apis:
LLVMInitializeMCJITCompilerOptions(&options, sizeof(options));
options.OptLevel = MODULE_OPT_LEVEL; /* 3...
2007 Mar 18
3
"ö" causes find_by_contents not to return
...build_index. The data is in utf-8.
Now calling Location.find_by_contents "?" does not return a result,
causes a lot of CPU load, and finally exits with an error "index.rb:702:
in ''parse'': failed to allocate memory (NoMemoryError)". Seems a problem
in ''process_query''.
Similar results for sometimes for other German Umlauts...
--
Posted via http://www.ruby-forum.com/.
2013 Sep 22
0
[LLVMdev] Bad permissions for mapped region
...xA25EA99: llvm::MCJIT::finalizeObject() (MCJIT.cpp:173)
> ==27130== by 0xAB57918: LLVMGetPointerToGlobal
> (ExecutionEngineBindings.cpp:332)
> ==27130== by 0x4E4813D: compile_query (ql.c:2286)
> ==27130== by 0x4E4836A: tusto_ql_compile (ql.c:2322)
> ==27130== by 0x402D19: process_query (ts_util.c:167)
> ==27130== by 0x403205: run_shell (ts_util.c:296)
>
> I have source tree checked out at f46e5eadc307beaef6e8dd0602bb4c63ca41fd50.
> To create MCJIT i use provided llvm-c apis:
>
> LLVMInitializeMCJITCompilerOptions(&options, sizeof(options));
> options....
2007 Mar 28
7
Newbie problem on production server
.../usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:706:in
`ensure_reader_open''
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:713:in
`ensure_searcher_open''
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:658:in
`process_query''
/usr/local/lib/ruby/1.8/monitor.rb:238:in `synchronize''
/usr/local/lib/ruby/gems/1.8/gems/ferret-0.11.3/lib/ferret/index.rb:657:in
`process_query''
/vendor/plugins/acts_as_ferret/lib/local_index.rb:87:in
`find_id_by_contents''
/vendor/plugins/acts_...
2007 Mar 31
4
not understanding search results
I''m getting some results that I don''t understand from a search.
The code, based on the tutorial, and the results are below.
Everything makes sense to me, except the results for
the ''title:"Some"'' query. I would think that it should
match the first two documents, but not the third.
What am I missing here?
Thanks for any help!
--- code
2006 Sep 20
3
Range searches some times they work, some times not...
...- range_new
Upper bound must be greater than lower bound. "1137702" <
"172098"
from
/usr/lib/ruby/gems/1.8/gems/ferret-0.10.1/lib/ferret/index.rb:572:in
`parse''
from
/usr/lib/ruby/gems/1.8/gems/ferret-0.10.1/lib/ferret/index.rb:572:in
`process_query''
from
/usr/lib/ruby/gems/1.8/gems/ferret-0.10.1/lib/ferret/index.rb:560:in
`do_search''
from
/usr/lib/ruby/gems/1.8/gems/ferret-0.10.1/lib/ferret/index.rb:233:in
`search''
from /usr/lib/ruby/1.8/monitor.rb:229:in `synchronize''
fr...
2007 Jul 26
1
doubts in ferret
I am using ferret to build a search application for my site. I used stemming
analyzer to build the index. When i searched "market" i get hits but on
searching "marketing" i get no hits,while there are fields containing the
word marketing. I am using stemming analyzer even while searching. Is the
problem with the analyzer? Or am I missing out something
-------------- next part
2007 Apr 30
1
Can''t search fields with space
Hi,
I have a user model that has a city field which is searchable using
acts_as_ferret.
But I can''t get it to return any result whether I use
:city => {:store => :no, :index => :untokenized},
or
:city => {:store => :no} in my User model''s acts_as_ferret option
>>> User.find_by_contents("city:(cal poly)")
=>
2007 Apr 03
3
[Repost] Problem with url searching..
Hi all,
I''ve posted that few weeks ago but no one answered, but this feature is
REALLY important for us.
I have many objects with a url field, of course containing standards
urls...
I''m trying to match them but i actually got problems with that.
Here''s a little code of what i would like to achieve:
require ''rubygems''
require
2006 Dec 16
10
Getting "ArgumentError ( isn''t a valid directory argument.
...ugins/acts_as_ferret/lib/multi_index.rb:82:in `initialize''
/vendor/plugins/acts_as_ferret/lib/multi_index.rb:82:in
`ensure_searcher''
/vendor/plugins/acts_as_ferret/lib/multi_index.rb:51:in
`query_parser''
/vendor/plugins/acts_as_ferret/lib/multi_index.rb:60:in
`process_query''
/vendor/plugins/acts_as_ferret/lib/multi_index.rb:26:in
`search_each''
/vendor/plugins/acts_as_ferret/lib/class_methods.rb:442:in
`id_multi_search''
/vendor/plugins/acts_as_ferret/lib/class_methods.rb:422:in
`multi_search''
/app/controllers/search_c...
2007 Jul 11
4
Query scoring - WTF?
Hi!
I thought I understood Ferret''s query scoring and how to tweak
results using boost values. What I currently experience however,
leaves me completely baffled.
Perhaps someone can shed some light on the scoring algorithm, because
asking Ferret to "explain" the score for a particular document isn''t
as informative as I thought. Actually, it confuses me even