I am trying to implement some ACL filter into my search queries and
the simplest way to do that seems to be a filtered query with a script
filter.
All my documents have a forum_pk field with the ID and I collect all
forum ids a user has access to. To filter out forums a user does not
has access to I came up with this: https://gist.github.com/1145266
The problem is that this now filters all documents and none is
returned, but there are documents with a forum_pk different then the
missing 8. In this query only forums with ID 8 should be filtered
out.
I use the mvel scripting interface, but also tried python with no
success.
I am trying to implement some ACL filter into my search queries and
the simplest way to do that seems to be a filtered query with a script
filter.
All my documents have a forum_pk field with the ID and I collect all
forum ids a user has access to. To filter out forums a user does not
has access to I came up with this:gist:1145266 · GitHub
The problem is that this now filters all documents and none is
returned, but there are documents with a forum_pk different then the
missing 8. In this query only forums with ID 8 should be filtered
out.
I use the mvel scripting interface, but also tried python with no
success.
I am trying to implement some ACL filter into my search queries and
the simplest way to do that seems to be a filtered query with a script
filter.
All my documents have a forum_pk field with the ID and I collect all
forum ids a user has access to. To filter out forums a user does not
has access to I came up with this:gist:1145266 · GitHub
The problem is that this now filters all documents and none is
returned, but there are documents with a forum_pk different then the
missing 8. In this query only forums with ID 8 should be filtered
out.
I use the mvel scripting interface, but also tried python with no
success.
this is great this is indeed mus simpler and faster. Thanks! Now I
just need to find out a way to filter out items with a index specific
terms filter if I search over more indices, do you have any suggestion
on this? Combining them with and or or does not seem to work
properly.
Regards,
Christopher.
On Mon, Aug 15, 2011 at 12:46 AM, Shay Banon kimchy@gmail.com wrote:
I suggest using terms filter for this, and not script, it will be faster and
cacheable.
I am trying to implement some ACL filter into my search queries and
the simplest way to do that seems to be a filtered query with a script
filter.
All my documents have a forum_pk field with the ID and I collect all
forum ids a user has access to. To filter out forums a user does not
has access to I came up with this:gist:1145266 · GitHub
The problem is that this now filters all documents and none is
returned, but there are documents with a forum_pk different then the
missing 8. In this query only forums with ID 8 should be filtered
out.
I use the mvel scripting interface, but also tried python with no
success.
this is great this is indeed mus simpler and faster. Thanks! Now I
just need to find out a way to filter out items with a index specific
terms filter if I search over more indices, do you have any suggestion
on this? Combining them with and or or does not seem to work
properly.
Regards,
Christopher.
On Mon, Aug 15, 2011 at 12:46 AM, Shay Banon kimchy@gmail.com wrote:
I suggest using terms filter for this, and not script, it will be faster
and
cacheable.
I am trying to implement some ACL filter into my search queries and
the simplest way to do that seems to be a filtered query with a script
filter.
All my documents have a forum_pk field with the ID and I collect all
forum ids a user has access to. To filter out forums a user does not
has access to I came up with this:gist:1145266 · GitHub
The problem is that this now filters all documents and none is
returned, but there are documents with a forum_pk different then the
missing 8. In this query only forums with ID 8 should be filtered
out.
I use the mvel scripting interface, but also tried python with no
success.
yea, I just played along with various filters and just stumbled upon
the type filter and this seems to be the one I was looking for. At
least the results now look as I want them to be, with index specific
acl checks.
Thanks so much!
Regards,
Christopher.
On Mon, Aug 15, 2011 at 1:00 PM, Shay Banon kimchy@gmail.com wrote:
Do you mean there are different fields you need to filter on between
indices? An or filter should work.
this is great this is indeed mus simpler and faster. Thanks! Now I
just need to find out a way to filter out items with a index specific
terms filter if I search over more indices, do you have any suggestion
on this? Combining them with and or or does not seem to work
properly.
Regards,
Christopher.
On Mon, Aug 15, 2011 at 12:46 AM, Shay Banon kimchy@gmail.com wrote:
I suggest using terms filter for this, and not script, it will be faster
and
cacheable.
I am trying to implement some ACL filter into my search queries and
the simplest way to do that seems to be a filtered query with a
script
filter.
All my documents have a forum_pk field with the ID and I collect
all
forum ids a user has access to. To filter out forums a user does not
has access to I came up with this:gist:1145266 · GitHub
The problem is that this now filters all documents and none is
returned, but there are documents with a forum_pk different then the
missing 8. In this query only forums with ID 8 should be filtered
out.
I use the mvel scripting interface, but also tried python with no
success.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.