Prepared query for making fast join on different entity (reader /container) [LUCENE-7031]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
Considering a Entity item{title}
and a entity ACL{item,user,permissions[]}
the relationship is ACL --->0-n--->Item
search1:lucene:title:t\*
search2:lucene :user:john and permissions:read
search1 on indexreader1, search2 on indexreader2
using prepared query on search2 , i can write on entity1 a special field tellling if search2(user) = true or false .
Making this observation i can also extends it for creating a bit mask considering several possibilities.
For example
search2:lucene :user:john and permissions:{read,write,delete}
contains 3 bits for every instance user associated to entity1.
So you can index (user|bitmask) , keeps all the infos for data retrievel.
If a index is a bytearray stream to scanning , why not insert a sub stream inside?
in this way lucene queries continues to be fast but it permits to make associations for different entities /readers/containers.
Image for example that very entity/reader is related to specific table on database or in different persistent repositories.
Associations in computer science are too much important , it is necessary to find a general solution for indexing them
---
Migrated from [LUCENE-7031](https://issues.apache.org/jira/browse/LUCENE-7031) by Cristian Lorenzetto
Contributor guide
Research direction
The issue names no source file, test, or concrete Lucene entry point. Start by determining whether prepared queries, index readers, and byte-array streams can support cross-entity associations; done would require a defined general design and an agreed implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100