Project

General

Profile

Actions

bug #4223

closed

Advanced search returns unexpected results

Added by Andreas Müller over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Highest
Category:
cdm-dataportal
Target version:
Start date:
Due date:
% Done:

50%

Estimated time:
Severity:
major
Found in Version:

Description

Advanced search on Tab 'Advanced' for a taxon name returns all names relevant for a part of the search. E.g. search "Lactuca triquetra" returns returns all Lactuca taxa, not only Lactuca triquetra (and non existing children). As this field is called name search but not free/full text search this for me is unexpected behaviour.

Example taken from cichorieae database.

see also #4220

another example from the corvidae portal:

searching for "Garrulus americanus" across all classifications. I did expect one or two hits, but 58 are shown.

http://dataportal.corvids.de/cdm_dataportal/search/results/taxon?ws=portal/taxon/search&query=Garrulus%20americanus&form_build_id=form-9raXidnUH8s5CGU_jKUD3iTs-x7hr1xWqv_uw6eRMXc&form_token=3Etv6Yq6fRNRWeLguLb5ym83Qru9kF4Xahi3b2A2stI&form_id=cdm_dataportal_search_taxon_form_advanced&search[pageSize]=25&search[pageNumber]=0&search[areas][areas_filter]=&search[tree]=NONE&search[doTaxa]=1&search[doSynonyms]=1&search[doTaxaByCommonNames]=1&pager[pageNumber]=0

Actions #1

Updated by Andreas Kohlbecker over 8 years ago

  • Keywords set to search
Actions #2

Updated by Andreas Kohlbecker over 7 years ago

  • Target version changed from cdm_dataportal RELEASE 3.5.0 to cdm_dataportal RELEASE 3.5.1

moving tickets to next milestone

Actions #3

Updated by Andreas Müller over 7 years ago

  • Target version deleted (cdm_dataportal RELEASE 3.5.1)

move open 3.5.1 tickets to next milestone after release

Actions #4

Updated by Andreas Müller over 7 years ago

  • Target version deleted ()
Actions #5

Updated by Andreas Müller over 7 years ago

  • Target version changed from cdm_dataportal RELEASE 3.8 to Reviewed Next Major Release
  • Priority changed from New to Priority13

Handle together with search refactoring

Actions #6

Updated by Andreas Kohlbecker almost 6 years ago

  • Description updated (diff)
Actions #7

Updated by Andreas Kohlbecker almost 6 years ago

  • Priority changed from Priority13 to Highest
Actions #8

Updated by Andreas Kohlbecker almost 6 years ago

  • Target version changed from Reviewed Next Major Release to Release 4.5
Actions #9

Updated by Gabriele Dröge almost 6 years ago

  • Tags changed from search to search, corvidae
Actions #10

Updated by Andreas Kohlbecker almost 6 years ago

Here we are facing two problems:

  1. The portal does not allow to do a phrase search with a query string like "Garrulus americanus". The web service works correctly in this case: http://api.cybertaxonomy.org/corvidae/portal/taxon/search.json?pageSize=25&pageNumber=0&doTaxa=1&doSynonyms=1&doTaxaByCommonNames=1&query=%22Garrulus+americanus%22
  2. When using the phrase search it is not possible to use wildcards at the same time. As noted in a related stack overflow post Lucene 2.9 has ComplexPhraseQueryParser which can handle wildcards in phrases. In the cdmlib we are currently using 5.4.1. An alternative solution could be to use MultiPhraseQuery, but as its summary says, you still need to enumerate the IndexReader.terms yourself to match the wildcard. (also from above names stackoverflow post)
Actions #11

Updated by Andreas Kohlbecker almost 6 years ago

The ComplexPhraseQueryParser is still available in the our current lucene version, so we could give this one a try.

Actions #12

Updated by Andreas Kohlbecker almost 6 years ago

  • Private changed from Yes to No
Actions #13

Updated by Andreas Kohlbecker almost 6 years ago

Andreas Kohlbecker wrote:

Here we are facing two problems:

  1. The portal does not allow to do a phrase search with a query string like "Garrulus americanus". The web service works correctly in this case: http://api.cybertaxonomy.org/corvidae/portal/taxon/search.json?pageSize=25&pageNumber=0&doTaxa=1&doSynonyms=1&doTaxaByCommonNames=1&query=%22Garrulus+americanus%22

Problem 1) is solved by cdm-dataportal|8bb9f541

Actions #14

Updated by Andreas Kohlbecker almost 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #15

Updated by Andreas Kohlbecker almost 6 years ago

  • Assignee changed from Andreas Kohlbecker to Gabriele Dröge

this issue is fully solved now, please do the review asap.

Actions #16

Updated by Gabriele Dröge almost 6 years ago

  • Assignee changed from Gabriele Dröge to Andreas Kohlbecker

Works for me in the Corvids test portal now.

Actions #17

Updated by Andreas Kohlbecker almost 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF