Closed alexhuang091 closed 11 months ago
debug shows the +
which means requires
are removed by pre-processing so what got passed into solr is basisOfRecord:"MATERIAL_SAMPLE" contentTypes:"EnvironmentalDNA"
that's why solr returns 1,493,360 records.
Seems we need to url encode +basisOfRecord:"MATERIAL_SAMPLE" +contentTypes:"EnvironmentalDNA"
first then append to fq=
Only a subset of SOLR query syntax is supported. I recommend users use AND
.
Not adding support for +fieldName
as this may generate more work if switching to Elasticsearch.
run this query
https://biocache.ala.org.au/occurrence/search?qualityProfile=ALA&disableAllQualityFilters=true&fq=basisOfRecord:"MATERIAL_SAMPLE" AND contentTypes:"EnvironmentalDNA"
returns 1,029,740 records.https://biocache.ala.org.au/occurrence/search?qualityProfile=ALA&disableAllQualityFilters=true&fq=+basisOfRecord:"MATERIAL_SAMPLE" +contentTypes:"EnvironmentalDNA"
returns 1,493,360 records.But when feeding 2 fqs directly into solr admin console, they return same number of records.
for
basisOfRecord:"MATERIAL_SAMPLE" AND contentTypes:"EnvironmentalDNA"
for
+basisOfRecord:"MATERIAL_SAMPLE" +contentTypes:"EnvironmentalDNA"
This may be related to https://github.com/AtlasOfLivingAustralia/DataQuality/issues/262. After this is fixed we can check if #DQ262 is still an issue.