#552: search_engine does not like "phrases"
-----------------------+-----------------
 Reporter:  rchyla     |      Owner:
     Type:  defect     |     Status:  new
 Priority:  major      |  Milestone:
Component:  *general*  |    Version:
 Keywords:             |
-----------------------+-----------------
 calling lower level api with phrases causes a bug

 This is OK:
 l = se.search_pattern_parenthesised(None, '(muon muon) or boson')

 This is not:
 l = se.search_pattern_parenthesised(None, '("muon muon") or boson')

 {{{
 est_terms_box)
    1995
    1996             # obtain a hitset for the current pattern

 -> 1997             current_hitset = search_pattern(req, current_pattern,
 f, m, ap, of, verbose, ln,
 display_nearest_terms_box=display_nearest_terms_box)
    1998
    1999             # combine the current hitset with resulting hitset
 using the current operator


 /opt/cds-invenio/lib/python/invenio/search_engine.pyc in
 search_pattern(req, p, f, m, ap, of, verbose, ln,
 display_nearest_terms_box)
    1816     for idx_unit in xrange(len(basic_search_units)):
    1817         bsu_o, bsu_p, bsu_f, bsu_m = basic_search_units[idx_unit]
 -> 1818         basic_search_unit_hitset = search_unit(bsu_p, bsu_f,
 bsu_m)
    1819         # FIXME: workaround for not having phrase index yet

    1820         if bsu_f == 'fulltext' and bsu_m != 'w' and
 of.startswith('h'):

 /opt/cds-invenio/lib/python/invenio/search_engine.pyc in search_unit(p, f,
 m)
    2056             set = search_unit_in_idxphrases(p, f, m)
    2057         else:
 -> 2058             set = search_unit_in_bibxxx(p, f, m)
    2059     elif p.startswith("cited:"):
    2060         # we are doing search by the citation count


 /opt/cds-invenio/lib/python/invenio/search_engine.pyc in
 search_unit_in_bibxxx(p, f, type)
    2206     query_params = () # will hold parameters for the query (their
 number may vary depending on TYPE argument)
    2207     # wash arguments:

 -> 2208     f = string.replace(f, '*', '%') # replace truncation char '*'
 in field definition
    2209     if type == 'r':

 }}}

 Not sure if related, but

 Perform_request_search(None, '"muon muon"')
 Perform_request_search(None, 'title:"muon muon"')

 Produces 0 hits, and even takes 40s to display list of papers where the
 very phrase is directly in the title

-- 
Ticket URL: <http://invenio-software.org/ticket/552>
Invenio <http://invenio-software.org>

Reply via email to