Sinar / popit_ng

Database and API implementation of Popolo standard
GNU Affero General Public License v3.0
22 stars 4 forks source link

Inconsistent search results for organizations and posts #197

Open kaerumy opened 8 years ago

kaerumy commented 8 years ago

Search by id: http://api.openhluttaw.org/en/search/organizations?q=id:897739b2831e41109713ac9d8a96c845

"id": "897739b2831e41109713ac9d8a96c845",
            "name": "Amyotha",
            "image": null,
            "classification": null

Direct request:

http://api.openhluttaw.org/en/organizations/897739b2831e41109713ac9d8a96c845

   "name": "Amyotha Hluttaw",
        "classification": "Upper House",
        "abstract": null,
        "description": null,
        "language_code": "en"
kaerumy commented 8 years ago

Search by id: http://api.openhluttaw.org/en/search/organizations?q=name:National%20League%20for%20Democracy

            "name": "National League for Democracy",
            "image": null,
            "classification": null

Direct request

http://api.openhluttaw.org/en/organizations/fd24165b8e814a758cd1098dc7a9038a

        "name": "National League for Democracy",
        "classification": "Party",
        "abstract": null,
        "description": null,
        "language_code": "en"
sweemeng commented 8 years ago
"id": "fd24165b8e814a758cd1098dc7a9038a",
"name": "National League for Democracy",
"image": null,
"classification": "Party"

Seach result is consistent now. could be due to slow indexing.

kaerumy commented 8 years ago

classification is still inconsistent

http://api.openhluttaw.org/en/search/organizations?q=classification:Party

Returns these:

Pao National Organization
Kachin Democratic Party
Zomi Congress for Democracy
Ta'Arng Palaung National Party
National Unity Party
Lisu National Development Party
Rakhine National Party
Shan Nationalities League for Democracy
Kokang Democracy and Unity Party
Mon National Party

But a few others with Party in classification field are not in results eg:

kaerumy commented 8 years ago

Happening on nested search results for posts too

http://api.popit.sinarproject.org/en/search/posts?q=organizations.name:1Malaysia%20Development%20Berhad%20Management%20AND%20label:Chief%20Executive%20Officer

image field for search result:

 "person": {
                        "name": "Shahrol Azral Ibrahim Halmi",
                        "image": "http://www.thestar.com.my/~/media/Images/TSOL/Photos-Gallery/Business/2014/05/17/Shahrol.ashx",
                    },

Direct query: http://api.popit.sinarproject.org/en/persons/538c23ff1c03f7115a526ece

image field for direct query result:

  "image": "https://web.archive.org/web/20160317134003im_/http://www.1mdb.com.my/sites/default/files/YBHG-DATUK-SHAHROL-AZRAL-IBRAHIM-HALMI.jpg",
kaerumy commented 8 years ago

elasticsearch entries seem to be working well on creation

sweemeng commented 8 years ago

highly probable that it is problem on generating list to update

sweemeng commented 8 years ago

cancel that, have nothing todo with update on nested field

kaerumy commented 8 years ago

Related elastic search traceback: #206