Project

General

Profile

bug #4223

Advanced search returns unexpected results

Added by Andreas Müller over 4 years ago. Updated almost 2 years ago.

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

50%

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

Associated revisions

Revision 8bb9f541 (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #4223 fixing request uri for accepted taxa
solves problem 1) in issue

Revision 5c69d02f (diff)
Added by Andreas Kohlbecker almost 2 years ago

fix #4223 using the ComplexPhraseQuery for phrase searches with wildcards

Revision b3d49e6e (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #4223 lucene based taxon search always as phrase search

Revision 67a5cafa (diff)
Added by Andreas Kohlbecker almost 2 years ago

ref #4223 dynamically added phrase search parentheses must not be stored in the SESSION

History

#1 Updated by Andreas Kohlbecker over 4 years ago

  • Keywords set to search

#2 Updated by Andreas Kohlbecker over 3 years ago

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

moving tickets to next milestone

#3 Updated by Andreas Müller over 3 years ago

  • Target version deleted (cdm_dataportal RELEASE 3.5.1)

move open 3.5.1 tickets to next milestone after release

#4 Updated by Andreas Müller over 3 years ago

  • Target version deleted ()

#5 Updated by Andreas Müller over 3 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

#6 Updated by Andreas Kohlbecker about 2 years ago

  • Description updated (diff)

#7 Updated by Andreas Kohlbecker about 2 years ago

  • Priority changed from Priority13 to Highest

#8 Updated by Andreas Kohlbecker about 2 years ago

  • Target version changed from Reviewed Next Major Release to Release 4.5

#9 Updated by Gabriele Dröge about 2 years ago

  • Tags changed from search to search, corvidae

#10 Updated by Andreas Kohlbecker almost 2 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)

#11 Updated by Andreas Kohlbecker almost 2 years ago

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

#12 Updated by Andreas Kohlbecker almost 2 years ago

  • Private changed from Yes to No

#13 Updated by Andreas Kohlbecker almost 2 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

#14 Updated by Andreas Kohlbecker almost 2 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

#15 Updated by Andreas Kohlbecker almost 2 years ago

  • Assignee changed from Andreas Kohlbecker to Gabriele Dröge

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

#16 Updated by Gabriele Dröge almost 2 years ago

  • Assignee changed from Gabriele Dröge to Andreas Kohlbecker

Works for me in the Corvids test portal now.

#17 Updated by Andreas Kohlbecker almost 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)