Wild-card in search giving inconsistent(?) results
In pre-shipping environment for Azure I created a new copy of this record: opendes:master-data--Wellbore:5432. The new record has id opendes:master-data--Wellbore:NO-5432. Only changes that was done on the record are:
- id - opendes:master-data--Wellbore:5432 --> opendes:master-data--Wellbore:NO-5432
- legal-tag - opendes-public-usa-check-1 --> opendes-public-usa-dataset-7643990
- data.FacilityName - "5432" --> "NO 5432"
Now if I do a search on the data.FacilityName with this query:
{
"kind": "osdu:wks:master-data--Wellbore:1.0.0",
"query":"data.FacilityName:5432",
"limit": 4
}
The result has a match on 2 records. Which makes sense(?):
- opendes:master-data--Wellbore:5432
- opendes:master-data--Wellbore:NO-5432
If I search for my newly created one it gets a bit more weird:
{
"kind": "osdu:wks:master-data--Wellbore:1.0.0",
"query":"data.FacilityName:NO 5432",
"limit": 4
}
This gives three results, the first two are the ones mentioned above, but the third one is strange:
- id: opendes:master-data--Wellbore:1551
- data.FacilityName: "1551"
Now let us add wildcards to the table:
{
"kind": "osdu:wks:master-data--Wellbore:1.0.0",
"query":"data.FacilityName:54?2",
"returnedFields": ["id", "data.FacilityName"],
"limit": 20
}
This returns 10 results, including the one I created at the beginning. It seems that FacilityName=5482 does not exist. Once again this seem to make some sense(?).
And now for the even stranger part, mixing my specific created id and a wildcard:
{
"kind": "osdu:wks:master-data--Wellbore:1.0.0",
"query":"data.FacilityName:NO 54?2",
"returnedFields": ["id", "data.FacilityName"],
"limit": 20
}
This returns 18 results which seem to be all over the place:
{
"results": [
{
"data": {
"FacilityName": "NO 5432"
},
"id": "opendes:master-data--Wellbore:NO-5432"
},
{
"data": {
"FacilityName": "2742"
},
"id": "opendes:master-data--Wellbore:2742"
},
{
"data": {
"FacilityName": "5403"
},
"id": "opendes:master-data--Wellbore:5403"
},
{
"data": {
"FacilityName": "5442"
},
"id": "opendes:master-data--Wellbore:5442"
},
{
"data": {
"FacilityName": "5412"
},
"id": "opendes:master-data--Wellbore:5412"
},
{
"data": {
"FacilityName": "5452"
},
"id": "opendes:master-data--Wellbore:5452"
},
{
"data": {
"FacilityName": "5462"
},
"id": "opendes:master-data--Wellbore:5462"
},
{
"data": {
"FacilityName": "5432"
},
"id": "opendes:master-data--Wellbore:5432"
},
{
"data": {
"FacilityName": "5472"
},
"id": "opendes:master-data--Wellbore:5472"
},
{
"data": {
"FacilityName": "5492"
},
"id": "opendes:master-data--Wellbore:5492"
},
{
"data": {
"FacilityName": "5507"
},
"id": "opendes:master-data--Wellbore:5507"
},
{
"data": {
"FacilityName": "5586"
},
"id": "opendes:master-data--Wellbore:5586"
},
{
"data": {
"FacilityName": "1551"
},
"id": "opendes:master-data--Wellbore:1551"
},
{
"data": {
"FacilityName": "3955"
},
"id": "opendes:master-data--Wellbore:3955"
},
{
"data": {
"FacilityName": "5417"
},
"id": "opendes:master-data--Wellbore:5417"
},
{
"data": {
"FacilityName": "5422"
},
"id": "opendes:master-data--Wellbore:5422"
},
{
"data": {
"FacilityName": "5402"
},
"id": "opendes:master-data--Wellbore:5402"
},
{
"data": {
"FacilityName": "1589"
},
"id": "opendes:master-data--Wellbore:1589"
}
],
"aggregations": null,
"totalCount": 18
}
I suspect it is the <space>
that I entered in the FacilityName that causes a lot of this behaviour?