Permalink
Browse files

api wip

  • Loading branch information...
1 parent 8f3f06c commit 6200030d729ce5ccc77cf7911c7070513ce3c06d @ghosthack ghosthack committed Dec 22, 2011
View
4 README.md
@@ -47,9 +47,9 @@ $ java -cp target/indextank-engine-1.0.0-jar-with-dependencies.jar com.flaptor.i
This command starts an API server (http://www.indextank.com/documentation/api) at port 20220.
The indexing and searching can be done with any client or for example, via curl:
-curl -d "{\"docid\":\"post1\", \"text\":\"I love Fallout\"}" -v -X PUT http://localhost:20220/v1/indexes/idx/docs
+curl -d "{\"docid\":\"post1\", \"fields\":{\"text\":\"I love Fallout\"}}" -v -X PUT http://localhost:20220/v1/indexes/idx/docs
-curl -d "{\"docid\":\"post2\", \"text\":\"I love Planescape\"}" -v -X PUT http://localhost:20220/v1/indexes/idx/docs
+curl -d "{\"docid\":\"post2\", \"fields\":{\"text\":\"I love Planescape\"}}" -v -X PUT http://localhost:20220/v1/indexes/idx/docs
curl http://localhost:20220/v1/indexes/idx/search?q=love
View
8 lucene-experimental/org/apache/lucene/util/BytesRef.java
@@ -122,7 +122,7 @@ public BytesRef(BytesRef other, boolean shallow) {
* unpaired surrogates or invalid UTF16 code units.
*/
public void copy(CharSequence text) {
- UnicodeUtil.UTF16toUTF8(text, 0, text.length(), this);
+ UnicodeUtil2.UTF16toUTF8(text, 0, text.length(), this);
}
/**
@@ -132,7 +132,7 @@ public void copy(CharSequence text) {
* unpaired surrogates or invalid UTF16 code units.
*/
public void copy(char text[], int offset, int length) {
- UnicodeUtil.UTF16toUTF8(text, offset, length, this);
+ UnicodeUtil2.UTF16toUTF8(text, offset, length, this);
}
public boolean bytesEquals(BytesRef other) {
@@ -212,13 +212,13 @@ public boolean equals(Object other) {
* resulting string */
public String utf8ToString() {
final CharsRef ref = new CharsRef(length);
- UnicodeUtil.UTF8toUTF16(bytes, offset, length, ref);
+ UnicodeUtil2.UTF8toUTF16(bytes, offset, length, ref);
return ref.toString();
}
/** Interprets stored bytes as UTF8 bytes into the given {@link CharsRef} */
public CharsRef utf8ToChars(CharsRef ref) {
- UnicodeUtil.UTF8toUTF16(bytes, offset, length, ref);
+ UnicodeUtil2.UTF8toUTF16(bytes, offset, length, ref);
return ref;
}
View
4 ...l/org/apache/lucene/util/UnicodeUtil.java → .../org/apache/lucene/util/UnicodeUtil2.java
@@ -93,7 +93,7 @@
* @lucene.internal
*/
-public final class UnicodeUtil {
+public final class UnicodeUtil2 {
/** A binary term consisting of a number of 0xff bytes, likely to be bigger than other terms
* one would normally encounter, and definitely bigger than any UTF-8 terms.
@@ -104,7 +104,7 @@
new byte[] {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1}
); // TODO this is unrelated here find a better place for it
- private UnicodeUtil() {} // no instance
+ private UnicodeUtil2() {} // no instance
public static final int UNI_SUR_HIGH_START = 0xD800;
public static final int UNI_SUR_HIGH_END = 0xDBFF;

0 comments on commit 6200030

Please sign in to comment.