Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

WebContent classes SearchMetaData and filtering with metadata value.

$
0
0

Hi,

We are using Unified search with connectors and we have two external sources to index. Both have SearchMetaData dates.

So I have tried to filter search results with the WebContent metadata date like show below.

"SearchMetaData": {
"date": {"StringValue$$string": "2016-09-29","$type": "EPiServer.Find.IndexValue, EPiServer.Find","___types": ["EPiServer.Find.IndexValue","System.Object"
            ]
        },
}

Example query:
query = query.Filter(x => DateTime.Parse((x as WebContent).SearchMetaData["date"].StringValue).After(date))


I know that I can get dates out like this in views but it seems like the query won't return any hits if you try to filter this way.


Is there any way to filter search results with metadata fields and how to do it if it's possible?

Any help would be appreciated.


Joni


Viewing all articles
Browse latest Browse all 6894

Trending Articles