Skip to content

Commit 35751c1

Browse files
committed
javadocs
1 parent e5a9110 commit 35751c1

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

server/src/main/java/org/elasticsearch/search/lookup/ValuesLookup.java

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,25 @@
1414
import java.util.Map;
1515
import java.util.Objects;
1616

17+
/**
18+
* Per-document values, from source or formatted doc-values
19+
*/
1720
public interface ValuesLookup {
1821

22+
/**
23+
* Returns a SourceLookup positioned on the current document
24+
*/
1925
SourceLookup source();
2026

27+
/**
28+
* Returns a LeafDocLookup positioned on the current document
29+
*/
2130
LeafDocLookup doc();
2231

32+
/**
33+
* Override the source exposed by a ValuesLookup
34+
*/
2335
static ValuesLookup wrapWithSource(ValuesLookup in, Map<String, Object> source, XContentType xContentType) {
24-
System.out.println("Building independent source: " + source);
2536
SourceLookup sourceLookup = new SourceLookup();
2637
sourceLookup.setSource(source);
2738
sourceLookup.setSourceContentType(Objects.requireNonNull(xContentType));
@@ -38,6 +49,9 @@ public LeafDocLookup doc() {
3849
};
3950
}
4051

52+
/**
53+
* Returns a source-only implementation of ValuesLookup
54+
*/
4155
static ValuesLookup sourceOnly(BytesReference source) {
4256
SourceLookup sourceLookup = new SourceLookup();
4357
sourceLookup.setSource(source);
@@ -54,6 +68,9 @@ public LeafDocLookup doc() {
5468
};
5569
}
5670

71+
/**
72+
* Returns a source-only implementation of ValuesLookup
73+
*/
5774
static ValuesLookup sourceOnly(Map<String, Object> source) {
5875
SourceLookup sourceLookup = new SourceLookup();
5976
sourceLookup.setSource(source);

0 commit comments

Comments
 (0)