Project

General

Profile

« Previous | Next » 

Revision 57158

Added by Enrico Ottonello over 4 years ago

solr 772 integration

View differences:

IndexDocument.java
10 10
	/**
11 11
	 * Adds a field with the given name, value and boost. If a field with the name already exists, then the given value is appended to the
12 12
	 * value of that field, with the new boost. If the value is a collection, then each of its values will be added to the field.
13
	 * <p>
13
	 * 
14 14
	 * The class type of value and the name parameter should match schema.xml. schema.xml can be found in conf directory under the solr home
15 15
	 * by default.
16
	 *
17
	 * @param name  Name of the field, should match one of the field names defined under "fields" tag in schema.xml.
18
	 * @param value Value of the field, should be of same class type as defined by "type" attribute of the corresponding field in schema.xml.
16
	 * 
17
	 * @param name
18
	 *            Name of the field, should match one of the field names defined under "fields" tag in schema.xml.
19
	 * @param value
20
	 *            Value of the field, should be of same class type as defined by "type" attribute of the corresponding field in schema.xml.
19 21
	 */
20 22
	public void addField(String name, Object value);
21 23

  
22 24
	/**
23 25
	 * Set a field with implied null value for boost.
24
	 *
25
	 * @param name  name of the field to set
26
	 * @param value value of the field
26
	 * 
27
	 * @param name
28
	 *            name of the field to set
29
	 * @param value
30
	 *            value of the field
27 31
	 */
28 32
	public void setField(String name, Object value);
29 33

  
30 34
	/**
31 35
	 * Get the first value for a field.
32
	 *
33
	 * @param name name of the field to fetch
36
	 * 
37
	 * @param name
38
	 *            name of the field to fetch
34 39
	 * @return first value of the field or null if not present
35 40
	 */
36 41
	public Object getFieldValue(String name);
37 42

  
38 43
	/**
39 44
	 * Gets the field.
40
	 *
41
	 * @param field the field
45
	 * 
46
	 * @param field
47
	 *            the field
42 48
	 * @return the field
43 49
	 */
44 50
	public IndexField getField(String field);
45 51

  
46 52
	/**
47 53
	 * Remove a field from the document.
48
	 *
49
	 * @param name The field name whose field is to be removed from the document
54
	 * 
55
	 * @param name
56
	 *            The field name whose field is to be removed from the document
50 57
	 * @return the previous field with <tt>name</tt>, or <tt>null</tt> if there was no field for <tt>key</tt>.
51 58
	 */
52 59
	public IndexField removeField(String name);
53 60

  
54 61
	/**
55 62
	 * Get all the values for a field.
56
	 *
57
	 * @param name name of the field to fetch
63
	 * 
64
	 * @param name
65
	 *            name of the field to fetch
58 66
	 * @return value of the field or null if not set
59 67
	 */
60 68
	public Collection<Object> getFieldValues(String name);
61 69

  
62 70
	/**
63 71
	 * Get all field names.
64
	 *
72
	 * 
65 73
	 * @return Set of all field names.
66 74
	 */
67 75
	public Collection<String> getFieldNames();
68 76

  
69 77
	/**
70 78
	 * return a copy of index Document.
71
	 *
79
	 * 
72 80
	 * @return the index document
73 81
	 */
74 82
	public IndexDocument deepCopy();
75 83

  
76 84
	/**
77 85
	 * Gets the status.
78
	 *
86
	 * 
79 87
	 * @return the status
80 88
	 */
81 89
	public Status getStatus();
82 90

  
83 91
	/**
84 92
	 * The set status.
85
	 *
86
	 * @param status the status
93
	 * 
94
	 * @param status
95
	 *            the status
87 96
	 * @return the index document
88 97
	 */
89 98
	public IndexDocument setStatus(Status status);
90 99

  
91 100
	/**
92 101
	 * If there was an error building the document, it is described here.
93
	 *
102
	 * 
94 103
	 * @return the error
95 104
	 */
96 105
	public Throwable getError();
97 106

  
98 107
	/**
99 108
	 * Sets the error.
100
	 *
101
	 * @param error the error
109
	 * 
110
	 * @param error
111
	 *            the error
102 112
	 * @return the index document
103 113
	 */
104 114
	public IndexDocument setError(final Throwable error);
105 115

  
106 116
	/**
107 117
	 * Sets the ok status to the index document.
108
	 *
118
	 * 
109 119
	 * @return the index document
110 120
	 */
111 121
	public IndexDocument setOK();
112 122

  
113 123
	/**
114 124
	 * Sets the status marked to the index document.
115
	 *
125
	 * 
116 126
	 * @return the index document
117 127
	 */
118 128
	public IndexDocument setMarked();

Also available in: Unified diff