Gravatar for noel.brennan@hpe.com

Question by Noel Brennan, Oct 30, 2018 5:20 PM

How do I restrict results returned in a query, fieldsToInclude does not exclude all I need excluded?

I use `fieldsToInclude: ["sysrowid","kmpmoid","orderingid","sysdate"]` in my query but a lot of additional stuff is returned also, see below. Is there a way to filter out the additional fields in the query results?

"results": [
        {
            "title": "HP Hub & Switch Management for OV-UX",
            "uri": "file://57530",
            "printableUri": "file://57530",
            "clickUri": "file://57530",
            "uniqueId": "42.17773$file://57530",
            "excerpt": "",
            "firstSentences": null,
            "summary": null,
            "flags": "SkipSentencesScoring",
            "hasHtmlVersion": false,
            "hasMobileHtmlVersion": false,
            "score": 0,
            "percentScore": 100,
            "rankingInfo": null,
            "rating": 3,
            "isTopResult": false,
            "isRecommendation": false,
            "titleHighlights": [],
            "firstSentencesHighlights": [],
            "excerptHighlights": [],
            "printableUriHighlights": [],
            "summaryHighlights": [],
            "parentResult": null,
            "childResults": [],
            "totalNumberOfChildResults": 0,
            "absentTerms": [],
            "raw": {
                "date": 1540564888000,
                "rowid": 15917506,
                "orderingid": 1540564863363,
                "sysdate": 1540564888000,
                "kmpmoid": "57530",
                "sysrowid": 15917506
            },
            "Title": "HP Hub & Switch Management for OV-UX",
            "Uri": "file://57530",
            "PrintableUri": "file://57530",
            "ClickUri": "file://57530",
            "UniqueId": "42.17773$file://57530",
            "Excerpt": "",
            "FirstSentences": null
        }

1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Oct 30, 2018 5:22 PM

The values at the root level of a search result (e.g.: title, uri...) are not fields. They are properties of the search results. They cannot be removed or filtered out. They are mandatory.

Ask a question