Customize PostService GetPosts() method in ublogsy
Hi Anthony,
I have to implement requirement like this. I need add Audience property to ublogsy Post document type as dropdown list with value (All, Australia, New Zealand)
And we need customize GetPosts() method allow filter post by country (AU/NZ).
I customize GetPosts method like this:
But when I call GetPosts(params, "Australia") it returns value same as old method and no filter by Audience.
Will I need add audience to ExamineIndex.config ? How I can add it?
I'd say you probably need to inject the audience value for the document. Take a look at the event hooks to see how extra values are injected into the index.
Customize PostService GetPosts() method in ublogsy
Hi Anthony,
I have to implement requirement like this. I need add Audience property to ublogsy Post document type as dropdown list with value (All, Australia, New Zealand) And we need customize GetPosts() method allow filter post by country (AU/NZ). I customize GetPosts method like this:
public IEnumerable
But when I call GetPosts(params, "Australia") it returns value same as old method and no filter by Audience. Will I need add audience to ExamineIndex.config ? How I can add it?
Thanks
I'd say you probably need to inject the audience value for the document. Take a look at the event hooks to see how extra values are injected into the index.
Hi Anthony, I added audience field to External Index Set
But after rebuild index, GetPosts function always return null. I don't need add to External Index set?
Can you show me which *.cs file to see to inject index?
Thanks
is working on a reply...