gaiaresources / ala-citizenscience

Automatically exported from code.google.com/p/ala-citizenscience
1 stars 4 forks source link

Field guide search not working correctly #234

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to: http://bdrs-uat.ala.org.au/bdrs-core/portal/14/home.htm
2. Open the field guide.
3. Search for "blue"

What is the expected output? What do you see instead?
There should be a few matches, however there is just one returned.
For example there are several species with "blue" in the common name (as 
evidenced by using any species autocomplete), none of which are returned by the 
field guide search.

Please use labels and text to provide additional information.

Original issue reported on code.google.com by chris.go...@gmail.com on 30 Apr 2012 at 4:29

GoogleCodeExporter commented 9 years ago
Investigation reveals that the problem is:
1) There is one index for all portals.
2) Portal ID is not indexed, nor does the query include the portal id as a 
parameter.

Hence, the results in this case hit 273 documents, but because of the 
pagination, of the first 50 of those 273 documents only one result is actually 
in the portal that was searched in.

Even more problematic is the ability to reindex on a per portal basis.  If a 
portal deletes the index and reindexes they will only be indexing the data from 
their portal effectively clobbering everyone else's results.

Original comment by chris.go...@gmail.com on 30 Apr 2012 at 5:29

GoogleCodeExporter commented 9 years ago
A good solution would be to have one index per portal, however I am yet to 
determine if this is doable with the shared hibernate configuration.

Original comment by chris.go...@gmail.com on 30 Apr 2012 at 5:30

GoogleCodeExporter commented 9 years ago
To answer my previous question, hibernate search supports sharding, this seems 
like it would be a good approach.  Probably the issue of deleting the index 
would still need to be addressed.

Original comment by chris.go...@gmail.com on 30 Apr 2012 at 5:53

GoogleCodeExporter commented 9 years ago
Unfortunately the sharding feature doesn't support runtime addition of new 
shards (which would be needed when adding a new Portal instance).  Back to 
indexing the portal_id field and adding a filter.

Original comment by chris.go...@gmail.com on 30 Apr 2012 at 11:45

GoogleCodeExporter commented 9 years ago
Added portalId as an indexed field and restricted searches.
Also modified the deleteIndex methods to not allow data from other portals to 
be deleted.

Original comment by chris.go...@gmail.com on 7 May 2012 at 4:44