1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (https://www.swig.org).
* Version 4.3.0
*
* Do not make changes to this file unless you know what you are doing - modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package org.xapian;
public class Enquire {
private transient long swigCPtr;
protected transient boolean swigCMemOwn;
protected Enquire(long cPtr, boolean cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = cPtr;
}
protected static long getCPtr(Enquire obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected static long swigRelease(Enquire obj) {
long ptr = 0;
if (obj != null) {
if (!obj.swigCMemOwn)
throw new RuntimeException("Cannot release ownership as memory is not owned");
ptr = obj.swigCPtr;
obj.swigCMemOwn = false;
obj.delete();
}
return ptr;
}
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
XapianJNI.delete_Enquire(swigCPtr);
}
swigCPtr = 0;
}
}
public Enquire(Database database) {
this(XapianJNI.new_Enquire(Database.getCPtr(database), database), true);
}
public void setQuery(Query query, long qlen) {
XapianJNI.Enquire_setQuery__SWIG_0(swigCPtr, this, Query.getCPtr(query), query, qlen);
}
public void setQuery(Query query) {
XapianJNI.Enquire_setQuery__SWIG_1(swigCPtr, this, Query.getCPtr(query), query);
}
public Query getQuery() {
return new Query(XapianJNI.Enquire_getQuery(swigCPtr, this), false);
}
public void addMatchspy(MatchSpy spy) {
XapianJNI.Enquire_addMatchspy(swigCPtr, this, MatchSpy.getCPtr(spy), spy);
}
public void clearMatchspies() {
XapianJNI.Enquire_clearMatchspies(swigCPtr, this);
}
public void setWeightingScheme(Weight weight_) {
XapianJNI.Enquire_setWeightingScheme(swigCPtr, this, Weight.getCPtr(weight_), weight_);
}
public void setExpansionScheme(String eweightname_, double expand_k_) {
XapianJNI.Enquire_setExpansionScheme__SWIG_0(swigCPtr, this, eweightname_, expand_k_);
}
public void setExpansionScheme(String eweightname_) {
XapianJNI.Enquire_setExpansionScheme__SWIG_1(swigCPtr, this, eweightname_);
}
public void setCollapseKey(int collapse_key, long collapse_max) {
XapianJNI.Enquire_setCollapseKey__SWIG_0(swigCPtr, this, collapse_key, collapse_max);
}
public void setCollapseKey(int collapse_key) {
XapianJNI.Enquire_setCollapseKey__SWIG_1(swigCPtr, this, collapse_key);
}
public void setDocidOrder(Enquire.docid_order order) {
XapianJNI.Enquire_setDocidOrder(swigCPtr, this, order.swigValue());
}
public void setCutoff(int percent_cutoff, double weight_cutoff) {
XapianJNI.Enquire_setCutoff__SWIG_0(swigCPtr, this, percent_cutoff, weight_cutoff);
}
public void setCutoff(int percent_cutoff) {
XapianJNI.Enquire_setCutoff__SWIG_1(swigCPtr, this, percent_cutoff);
}
public void setSortByRelevance() {
XapianJNI.Enquire_setSortByRelevance(swigCPtr, this);
}
public void setSortByValue(int sort_key, boolean reverse) {
XapianJNI.Enquire_setSortByValue(swigCPtr, this, sort_key, reverse);
}
public void setSortByKey(KeyMaker sorter, boolean reverse) {
XapianJNI.Enquire_setSortByKey(swigCPtr, this, KeyMaker.getCPtr(sorter), sorter, reverse);
}
public void setSortByValueThenRelevance(int sort_key, boolean reverse) {
XapianJNI.Enquire_setSortByValueThenRelevance(swigCPtr, this, sort_key, reverse);
}
public void setSortByKeyThenRelevance(KeyMaker sorter, boolean reverse) {
XapianJNI.Enquire_setSortByKeyThenRelevance(swigCPtr, this, KeyMaker.getCPtr(sorter), sorter, reverse);
}
public void setSortByRelevanceThenValue(int sort_key, boolean reverse) {
XapianJNI.Enquire_setSortByRelevanceThenValue(swigCPtr, this, sort_key, reverse);
}
public void setSortByRelevanceThenKey(KeyMaker sorter, boolean reverse) {
XapianJNI.Enquire_setSortByRelevanceThenKey(swigCPtr, this, KeyMaker.getCPtr(sorter), sorter, reverse);
}
public void setTimeLimit(double time_limit) {
XapianJNI.Enquire_setTimeLimit(swigCPtr, this, time_limit);
}
public MSet getMSet(long first, long maxitems, long checkatleast, RSet omrset, MatchDecider mdecider) {
return new MSet(XapianJNI.Enquire_getMSet__SWIG_0(swigCPtr, this, first, maxitems, checkatleast, RSet.getCPtr(omrset), omrset, MatchDecider.getCPtr(mdecider), mdecider), true);
}
public MSet getMSet(long first, long maxitems, long checkatleast, RSet omrset) {
return new MSet(XapianJNI.Enquire_getMSet__SWIG_1(swigCPtr, this, first, maxitems, checkatleast, RSet.getCPtr(omrset), omrset), true);
}
public MSet getMSet(long first, long maxitems, long checkatleast) {
return new MSet(XapianJNI.Enquire_getMSet__SWIG_2(swigCPtr, this, first, maxitems, checkatleast), true);
}
public MSet getMSet(long first, long maxitems) {
return new MSet(XapianJNI.Enquire_getMSet__SWIG_3(swigCPtr, this, first, maxitems), true);
}
public MSet getMSet(long first, long maxitems, RSet omrset, MatchDecider mdecider) {
return new MSet(XapianJNI.Enquire_getMSet__SWIG_4(swigCPtr, this, first, maxitems, RSet.getCPtr(omrset), omrset, MatchDecider.getCPtr(mdecider), mdecider), true);
}
public MSet getMSet(long first, long maxitems, RSet omrset) {
return new MSet(XapianJNI.Enquire_getMSet__SWIG_5(swigCPtr, this, first, maxitems, RSet.getCPtr(omrset), omrset), true);
}
public ESet getESet(long maxitems, RSet omrset, int flags, ExpandDecider edecider, double min_wt) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_0(swigCPtr, this, maxitems, RSet.getCPtr(omrset), omrset, flags, ExpandDecider.getCPtr(edecider), edecider, min_wt), true);
}
public ESet getESet(long maxitems, RSet omrset, int flags, ExpandDecider edecider) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_1(swigCPtr, this, maxitems, RSet.getCPtr(omrset), omrset, flags, ExpandDecider.getCPtr(edecider), edecider), true);
}
public ESet getESet(long maxitems, RSet omrset, int flags) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_2(swigCPtr, this, maxitems, RSet.getCPtr(omrset), omrset, flags), true);
}
public ESet getESet(long maxitems, RSet omrset) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_3(swigCPtr, this, maxitems, RSet.getCPtr(omrset), omrset), true);
}
public ESet getESet(long maxitems, RSet omrset, ExpandDecider edecider) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_4(swigCPtr, this, maxitems, RSet.getCPtr(omrset), omrset, ExpandDecider.getCPtr(edecider), edecider), true);
}
public ESet getESet(long maxitems, RSet rset, int flags, double k, ExpandDecider edecider, double min_wt) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_5(swigCPtr, this, maxitems, RSet.getCPtr(rset), rset, flags, k, ExpandDecider.getCPtr(edecider), edecider, min_wt), true);
}
public ESet getESet(long maxitems, RSet rset, int flags, double k, ExpandDecider edecider) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_6(swigCPtr, this, maxitems, RSet.getCPtr(rset), rset, flags, k, ExpandDecider.getCPtr(edecider), edecider), true);
}
public ESet getESet(long maxitems, RSet rset, int flags, double k) {
return new ESet(XapianJNI.Enquire_getESet__SWIG_7(swigCPtr, this, maxitems, RSet.getCPtr(rset), rset, flags, k), true);
}
public TermIterator getMatchingTermsBegin(long did) {
return new TermIterator(XapianJNI.Enquire_getMatchingTermsBegin__SWIG_0(swigCPtr, this, did), true);
}
public TermIterator getMatchingTermsEnd(long arg0) {
return new TermIterator(XapianJNI.Enquire_getMatchingTermsEnd__SWIG_0(swigCPtr, this, arg0), true);
}
public TermIterator getMatchingTermsBegin(MSetIterator it) {
return new TermIterator(XapianJNI.Enquire_getMatchingTermsBegin__SWIG_1(swigCPtr, this, MSetIterator.getCPtr(it), it), true);
}
public TermIterator getMatchingTermsEnd(MSetIterator arg0) {
return new TermIterator(XapianJNI.Enquire_getMatchingTermsEnd__SWIG_1(swigCPtr, this, MSetIterator.getCPtr(arg0), arg0), true);
}
public String toString() {
return XapianJNI.Enquire_toString(swigCPtr, this);
}
public String[] getMatchingTerms(MSetIterator item) { return XapianJNI.Enquire_getMatchingTerms(swigCPtr, this, MSetIterator.getCPtr(item), item); }
public final static class docid_order {
public final static Enquire.docid_order ASCENDING = new Enquire.docid_order("ASCENDING", XapianJNI.Enquire_ASCENDING_get());
public final static Enquire.docid_order DESCENDING = new Enquire.docid_order("DESCENDING", XapianJNI.Enquire_DESCENDING_get());
public final static Enquire.docid_order DONT_CARE = new Enquire.docid_order("DONT_CARE", XapianJNI.Enquire_DONT_CARE_get());
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static docid_order swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + docid_order.class + " with value " + swigValue);
}
private docid_order(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private docid_order(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private docid_order(String swigName, docid_order swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static docid_order[] swigValues = { ASCENDING, DESCENDING, DONT_CARE };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
public final static int INCLUDE_QUERY_TERMS = XapianJNI.Enquire_INCLUDE_QUERY_TERMS_get();
public final static int USE_EXACT_TERMFREQ = XapianJNI.Enquire_USE_EXACT_TERMFREQ_get();
}
|