Package org.alfresco.solr.query
Interface StructuredFieldPosition
- All Known Implementing Classes:
AbsoluteStructuredFieldPosition,AbstractStructuredFieldPosition,AnyStructuredFieldPosition,DescendantAndSelfStructuredFieldPosition,RelativeStructuredFieldPosition,SelfAxisStructuredFieldPosition
public interface StructuredFieldPosition
Elements used to test agains path and Qname
- Author:
- andyh
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanintIf absolute return the position.Get the test to search for in the term query.booleanIs this an absolute element; that is, it knows its exact position.booleanbooleanThis element only knows its position relative to the previous element.booleanIf this position is last in the chain and it is terminal it will ensure it is an exact match for the length of the chain found.booleanbooleanlinkSelf()Normally paths would require onlt parent chaining.intmatches(int start, int end, int offset) Does this element matchbooleanvoidA reference to the caching term positions this element uses.
-
Method Details
-
matches
Does this element match- Parameters:
start- - the start postion of the paths termsend- - the end position of the paths termsoffset- - the current offset in the path- Returns:
- returns the next match position (usually offset + 1) or -1 if it does not match.
- Throws:
IOException
-
isTerminal
boolean isTerminal()If this position is last in the chain and it is terminal it will ensure it is an exact match for the length of the chain found. If false, it will effectively allow prefix mathces for the likes of descendant-and-below style queries.- Returns:
- boolean
-
isAbsolute
boolean isAbsolute()Is this an absolute element; that is, it knows its exact position.- Returns:
- boolean
-
isRelative
boolean isRelative()This element only knows its position relative to the previous element.- Returns:
- boolean
-
getTermText
String getTermText()Get the test to search for in the term query. This may be null if it should not have a term query- Returns:
- String
-
getPosition
int getPosition()If absolute return the position. If relative we could compute the position knowing the previous term unless this element is preceded by a descendat and below style element- Returns:
- int
-
setCachingTermPositions
A reference to the caching term positions this element uses. This may be null which indicates all terms match, in that case there is no action against the index- Parameters:
tps- CachingTermPositions
-
getCachingTermPositions
CachingTermPositions getCachingTermPositions() -
linkSelf
boolean linkSelf()Normally paths would require onlt parent chaining. for some it is parent and child chaining.- Returns:
- boolean
-
linkParent
boolean linkParent() -
allowslinkingByParent
boolean allowslinkingByParent() -
allowsLinkingBySelf
boolean allowsLinkingBySelf() -
isDescendant
boolean isDescendant() -
matchesAll
boolean matchesAll()
-