Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
hey out there,
this is a weird one, not sure if it's me or a bug...
in v7 i used to filter by parent id using +parentID:1172 as a lucene search:
however the same query isn't working in v8! i've defo got items in the index e.g.
but when i run the search, no items come back...
although v8 is missing the toggle between a text search and a lucene search the search seems to accept lucene based searches as something like +__NodeTypeAlias:blogpost +postDateYearAndMonth:2019-sep works:
am i missing something obvious here?!?!
ok, so this is interesting. i did some debugging of the search code i'd written and looked at the examine query and it's looks a little weird...
this is the code:
var parentId = 2287;
var query = searcher.CreateQuery("content")
var results = query.All().Execute();
totalRecords = results.TotalItemCount;
which generates a lucene query of:
+__NodeTypeAlias:blogpost +(parentID:[2287 TO 2287])
and i get results back!
however, if i take that lucene query and paste it into luke to test the query i get nothing back...
if i change the query to:
+__NodeTypeAlias:blogpost parentID:[2287 TO 2287]
then i get results!
the knock on of all this is that at some point i want to be able to do a GroupedOr query e.g.
get me all the blog posts that have the parentId 1234 or 5678 or 9101
but GroupedOr only allows strings to be passed to it...
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted