diff options
Diffstat (limited to 'documentapi')
11 files changed, 265 insertions, 190 deletions
diff --git a/documentapi/abi-spec.json b/documentapi/abi-spec.json index 20043450501..49bdf32bfb1 100644 --- a/documentapi/abi-spec.json +++ b/documentapi/abi-spec.json @@ -484,12 +484,16 @@ "public" ], "methods": [ + "public void <init>()", "public void <init>(long)", "public void <init>(com.yahoo.documentapi.Result$ResultType, java.lang.Error)", + "public void <init>(com.yahoo.documentapi.Result$ResultType, com.yahoo.messagebus.Error)", "public boolean isSuccess()", "public java.lang.Error getError()", + "public com.yahoo.messagebus.Error error()", "public long getRequestId()", - "public com.yahoo.documentapi.Result$ResultType type()" + "public com.yahoo.documentapi.Result$ResultType type()", + "public static com.yahoo.messagebus.Error toError(com.yahoo.documentapi.Result$ResultType)" ], "fields": [] }, diff --git a/documentapi/src/main/java/com/yahoo/documentapi/Result.java b/documentapi/src/main/java/com/yahoo/documentapi/Result.java index 9509a485654..d4426ed8c9d 100644 --- a/documentapi/src/main/java/com/yahoo/documentapi/Result.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/Result.java @@ -1,6 +1,9 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.documentapi; +import com.yahoo.messagebus.Error; +import com.yahoo.messagebus.ErrorCode; + /** * The <i>synchronous</i> result of submitting an asynchronous operation. * A result is either a success or not. If it is not a success, it will contain an explanation of why. @@ -11,25 +14,43 @@ package com.yahoo.documentapi; public class Result { /** Null if this is a success, set to the error occurring if this is a failure */ - private Error error = null; + private final Error error; /** The id of this operation */ - private long requestId; + private final long requestId; + + private final ResultType type; - private ResultType type = ResultType.SUCCESS; + /** Creates a successful result with requestId zero */ + public Result() { + this(0); + } /** * Creates a successful result * * @param requestId the ID of the request */ public Result(long requestId) { + this.error = null; this.requestId = requestId; + type = ResultType.SUCCESS; } /** * Creates a unsuccessful result * + * @deprecated Will be removed on Vespa 8 due to incorrect java.lang.Error + */ + @Deprecated(forRemoval = true, since="7") + public Result(ResultType type, java.lang.Error error) { + this.type = type; + this.error = new Error(0, error.getMessage()); + this.requestId = 0; + } + /** + * Creates a unsuccessful result + * * @param type the type of failure * @param error the error to encapsulate in this Result * @see com.yahoo.documentapi.Result.ResultType @@ -37,6 +58,7 @@ public class Result { public Result(ResultType type, Error error) { this.type = type; this.error = error; + this.requestId = 0; } /** @@ -54,8 +76,12 @@ public class Result { * If this was a success, this method returns null. * * @return the Error, or null + * @deprecated Will be removed on Vespa 8 */ - public Error getError() { return error; } + @Deprecated(forRemoval = true, since="7") + public java.lang.Error getError() { return new java.lang.Error(error.getMessage()); } + + public Error error() { return error; } /** * Returns the id of this operation. The asynchronous response to this operation @@ -85,5 +111,16 @@ public class Result { @Deprecated(since = "7", forRemoval = true) // TODO: Remove on Vespa 8 — this is a Response outcome, not a Result outcome. CONDITION_NOT_MET_ERROR } + public static Error toError(ResultType result) { + switch (result) { + case TRANSIENT_ERROR: + return new Error(ErrorCode.TRANSIENT_ERROR, ResultType.TRANSIENT_ERROR.name()); + case CONDITION_NOT_MET_ERROR: + return new Error(ErrorCode.FATAL_ERROR, ResultType.CONDITION_NOT_MET_ERROR.name()); + case FATAL_ERROR: + return new Error(ErrorCode.FATAL_ERROR, ResultType.FATAL_ERROR.name()); + } + return new Error(ErrorCode.NONE, "SUCCESS"); + } } diff --git a/documentapi/src/main/java/com/yahoo/documentapi/local/LocalAsyncSession.java b/documentapi/src/main/java/com/yahoo/documentapi/local/LocalAsyncSession.java index 102fa73f2ec..591b4c80436 100644 --- a/documentapi/src/main/java/com/yahoo/documentapi/local/LocalAsyncSession.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/local/LocalAsyncSession.java @@ -45,8 +45,8 @@ public class LocalAsyncSession implements AsyncSession { private final Executor executor = Executors.newCachedThreadPool(); private final AtomicReference<Phaser> phaser; - private AtomicLong requestId = new AtomicLong(0); - private AtomicReference<Result.ResultType> result = new AtomicReference<>(SUCCESS); + private final AtomicLong requestId = new AtomicLong(0); + private final AtomicReference<Result.ResultType> result = new AtomicReference<>(SUCCESS); public LocalAsyncSession(AsyncParameters params, LocalDocumentAccess access) { this.handler = params.getResponseHandler(); @@ -163,7 +163,7 @@ public class LocalAsyncSession implements AsyncSession { private Result send(Function<Long, Response> responses, DocumentOperationParameters parameters) { Result.ResultType resultType = result.get(); if (resultType != SUCCESS) - return new Result(resultType, new Error()); + return new Result(resultType, Result.toError(resultType)); ResponseHandler responseHandler = parameters.responseHandler().orElse(this::addResponse); long req = requestId.incrementAndGet(); diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusAsyncSession.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusAsyncSession.java index 279e04c43b4..8809e05caf3 100644 --- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusAsyncSession.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusAsyncSession.java @@ -26,6 +26,7 @@ import com.yahoo.documentapi.messagebus.protocol.RemoveDocumentMessage; import com.yahoo.documentapi.messagebus.protocol.RemoveDocumentReply; import com.yahoo.documentapi.messagebus.protocol.UpdateDocumentMessage; import com.yahoo.documentapi.messagebus.protocol.UpdateDocumentReply; +import com.yahoo.messagebus.Error; import com.yahoo.messagebus.ErrorCode; import com.yahoo.messagebus.Message; import com.yahoo.messagebus.MessageBus; @@ -187,7 +188,7 @@ public class MessageBusAsyncSession implements MessageBusSession, AsyncSession { return toResult(reqId, session.send(msg)); } } catch (Exception e) { - return new Result(Result.ResultType.FATAL_ERROR, new Error(e.getMessage(), e)); + return new Result(Result.ResultType.FATAL_ERROR, new Error(ErrorCode.FATAL_ERROR, e.toString())); } } @@ -285,8 +286,7 @@ public class MessageBusAsyncSession implements MessageBusSession, AsyncSession { return new Result(reqId); } return new Result( - messageBusErrorToResultType(mbusResult.getError().getCode()), - new Error(mbusResult.getError().getMessage() + " (" + mbusResult.getError().getCode() + ")")); + messageBusErrorToResultType(mbusResult.getError().getCode()), mbusResult.getError()); } private static Response.Outcome toOutcome(Reply reply) { diff --git a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusSyncSession.java b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusSyncSession.java index 318b518f44e..1b0a6db3d53 100755 --- a/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusSyncSession.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/messagebus/MessageBusSyncSession.java @@ -112,7 +112,7 @@ public class MessageBusSyncSession implements MessageBusSession, SyncSession, Re Thread.sleep(100); } if (!result.isSuccess()) { - throw new DocumentAccessException(result.getError().toString()); + throw new DocumentAccessException(result.error().toString()); } return monitor.waitForReply(); } catch (InterruptedException e) { diff --git a/documentapi/src/test/cfg/documentmanager.cfg b/documentapi/src/test/cfg/documentmanager.cfg index 75f205337a1..14816bd0a2c 100644 --- a/documentapi/src/test/cfg/documentmanager.cfg +++ b/documentapi/src/test/cfg/documentmanager.cfg @@ -1,29 +1,59 @@ -datatype[3] -datatype[0].id -1910204744 -datatype[0].arraytype[0] -datatype[0].weightedsettype[0] -datatype[0].structtype[1] -datatype[0].structtype[0].name music.header -datatype[0].structtype[0].version 0 -datatype[0].structtype[0].field[1] -datatype[0].structtype[0].field[0].name artist -datatype[0].structtype[0].field[0].id[0] -datatype[0].structtype[0].field[0].datatype 2 -datatype[0].documenttype[0] -datatype[1].id 993120973 -datatype[1].arraytype[0] -datatype[1].weightedsettype[0] -datatype[1].structtype[1] -datatype[1].structtype[0].name music.body -datatype[1].structtype[0].version 0 -datatype[1].documenttype[0] -datatype[2].id 1412693671 -datatype[2].arraytype[0] -datatype[2].weightedsettype[0] -datatype[2].structtype[0] -datatype[2].documenttype[1] -datatype[2].documenttype[0].name music -datatype[2].documenttype[0].version 0 -datatype[2].documenttype[0].inherits[0] -datatype[2].documenttype[0].headerstruct -1910204744 -datatype[2].documenttype[0].bodystruct 993120973 +doctype[2] +doctype[0].name "document" +doctype[0].idx 10000 +doctype[0].contentstruct 10001 +doctype[0].primitivetype[0].idx 10002 +doctype[0].primitivetype[0].internalid 0 +doctype[0].primitivetype[0].name "int" +doctype[0].primitivetype[1].idx 10003 +doctype[0].primitivetype[1].internalid 5 +doctype[0].primitivetype[1].name "double" +doctype[0].primitivetype[2].idx 10004 +doctype[0].primitivetype[2].internalid 2 +doctype[0].primitivetype[2].name "string" +doctype[0].annotationtype[0].idx 10005 +doctype[0].annotationtype[0].name "proximity_break" +doctype[0].annotationtype[0].internalid 8 +doctype[0].annotationtype[0].datatype 10003 +doctype[0].annotationtype[1].idx 10006 +doctype[0].annotationtype[1].name "normalized" +doctype[0].annotationtype[1].internalid 4 +doctype[0].annotationtype[1].datatype 10004 +doctype[0].annotationtype[2].idx 10007 +doctype[0].annotationtype[2].name "reading" +doctype[0].annotationtype[2].internalid 5 +doctype[0].annotationtype[2].datatype 10004 +doctype[0].annotationtype[3].idx 10008 +doctype[0].annotationtype[3].name "term" +doctype[0].annotationtype[3].internalid 1 +doctype[0].annotationtype[3].datatype 10004 +doctype[0].annotationtype[4].idx 10009 +doctype[0].annotationtype[4].name "transformed" +doctype[0].annotationtype[4].internalid 7 +doctype[0].annotationtype[4].datatype 10004 +doctype[0].annotationtype[5].idx 10010 +doctype[0].annotationtype[5].name "canonical" +doctype[0].annotationtype[5].internalid 3 +doctype[0].annotationtype[5].datatype 10004 +doctype[0].annotationtype[6].idx 10011 +doctype[0].annotationtype[6].name "token_type" +doctype[0].annotationtype[6].internalid 2 +doctype[0].annotationtype[6].datatype 10002 +doctype[0].annotationtype[7].idx 10012 +doctype[0].annotationtype[7].name "special_token" +doctype[0].annotationtype[7].internalid 9 +doctype[0].annotationtype[8].idx 10013 +doctype[0].annotationtype[8].name "stem" +doctype[0].annotationtype[8].internalid 6 +doctype[0].annotationtype[8].datatype 10004 +doctype[0].structtype[0].idx 10001 +doctype[0].structtype[0].name document.header +doctype[1].name "music" +doctype[1].idx 10014 +doctype[1].inherits[0].idx 10000 +doctype[1].contentstruct 10015 +doctype[1].structtype[0].idx 10015 +doctype[1].structtype[0].name music.header +doctype[1].structtype[0].field[0].name "artist" +doctype[1].structtype[0].field[0].internalid 51903611 +doctype[1].structtype[0].field[0].type 10004 diff --git a/documentapi/src/test/java/com/yahoo/documentapi/local/LocalDocumentApiTestCase.java b/documentapi/src/test/java/com/yahoo/documentapi/local/LocalDocumentApiTestCase.java index 3a748ca173a..69fa32986f2 100644 --- a/documentapi/src/test/java/com/yahoo/documentapi/local/LocalDocumentApiTestCase.java +++ b/documentapi/src/test/java/com/yahoo/documentapi/local/LocalDocumentApiTestCase.java @@ -111,7 +111,7 @@ public class LocalDocumentApiTestCase extends AbstractDocumentApiTestCase { for (DocumentId id : ids) { Result result = session.get(id); if ( ! result.isSuccess()) - throw new IllegalStateException("Failed requesting document " + id, result.getError().getCause()); + throw new IllegalStateException("Failed requesting document " + id + ": " + result.error().toString()); outstandingRequests.add(result.getRequestId()); } diff --git a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/Destination.java b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/Destination.java index e08d9b14ee5..0b2664a75ee 100644 --- a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/Destination.java +++ b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/Destination.java @@ -4,9 +4,11 @@ package com.yahoo.documentapi.messagebus; import com.yahoo.document.DocumentRemove; import com.yahoo.documentapi.DocumentAccess; import com.yahoo.documentapi.DocumentAccessParams; +import com.yahoo.documentapi.ProgressToken; import com.yahoo.documentapi.SyncParameters; import com.yahoo.documentapi.SyncSession; import com.yahoo.documentapi.local.LocalDocumentAccess; +import com.yahoo.documentapi.messagebus.protocol.CreateVisitorReply; import com.yahoo.documentapi.messagebus.protocol.DocumentMessage; import com.yahoo.documentapi.messagebus.protocol.DocumentProtocol; import com.yahoo.documentapi.messagebus.protocol.GetDocumentMessage; @@ -20,21 +22,23 @@ import com.yahoo.messagebus.Error; import com.yahoo.messagebus.ErrorCode; import com.yahoo.messagebus.Message; import com.yahoo.messagebus.MessageHandler; -import com.yahoo.messagebus.Protocol; import com.yahoo.messagebus.RPCMessageBus; import com.yahoo.messagebus.Reply; import com.yahoo.messagebus.network.Identity; import com.yahoo.messagebus.network.rpc.RPCNetworkParams; -import java.util.Arrays; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; /** * Mock-up destination used for testing. * - * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a> + * @author Einar M R Rosenvinge */ public class Destination implements MessageHandler { + final AtomicBoolean discard = new AtomicBoolean(); + private final DestinationSession session; private final DocumentAccess access; private final SyncSession local; @@ -46,7 +50,7 @@ public class Destination implements MessageHandler { params.setDocumentManagerConfigId(documentManagerConfigId); access = new LocalDocumentAccess(params); local = access.createSyncSession(new SyncParameters.Builder().build()); - bus = new RPCMessageBus(Arrays.asList((Protocol)new DocumentProtocol(access.getDocumentTypeManager())), + bus = new RPCMessageBus(List.of(new DocumentProtocol(access.getDocumentTypeManager())), new RPCNetworkParams().setNumNetworkThreads(1) .setIdentity(new Identity("test/destination")) .setSlobrokConfigId(slobrokConfigId), @@ -54,33 +58,38 @@ public class Destination implements MessageHandler { session = bus.getMessageBus().createDestinationSession("session", true, this); } - protected void sendReply(Reply reply) { - session.reply(reply); - } - public void handleMessage(Message msg) { + if (discard.get()) { + msg.discard(); + return; + } + Reply reply = ((DocumentMessage)msg).createReply(); try { switch (msg.getType()) { - case DocumentProtocol.MESSAGE_GETDOCUMENT: - reply = new GetDocumentReply(local.get(((GetDocumentMessage)msg).getDocumentId())); - break; + case DocumentProtocol.MESSAGE_GETDOCUMENT: + reply = new GetDocumentReply(local.get(((GetDocumentMessage)msg).getDocumentId())); + break; + + case DocumentProtocol.MESSAGE_PUTDOCUMENT: + local.put(((PutDocumentMessage)msg).getDocumentPut()); + break; - case DocumentProtocol.MESSAGE_PUTDOCUMENT: - local.put(((PutDocumentMessage)msg).getDocumentPut()); - break; + case DocumentProtocol.MESSAGE_REMOVEDOCUMENT: + local.remove(new DocumentRemove(((RemoveDocumentMessage)msg).getDocumentId())); + break; - case DocumentProtocol.MESSAGE_REMOVEDOCUMENT: - local.remove(new DocumentRemove(((RemoveDocumentMessage)msg).getDocumentId())); - break; + case DocumentProtocol.MESSAGE_UPDATEDOCUMENT: + local.update(((UpdateDocumentMessage)msg).getDocumentUpdate()); + break; - case DocumentProtocol.MESSAGE_UPDATEDOCUMENT: - local.update(((UpdateDocumentMessage)msg).getDocumentUpdate()); - break; + case DocumentProtocol.MESSAGE_CREATEVISITOR: + ((CreateVisitorReply) reply).setLastBucket(ProgressToken.FINISHED_BUCKET); + break; - default: - throw new UnsupportedOperationException("Unsupported message type '" + msg.getType() + "'."); + default: + throw new UnsupportedOperationException("Unsupported message type '" + msg.getType() + "'."); } } catch (Exception e) { reply = new EmptyReply(); diff --git a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusDocumentApiTestCase.java b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusDocumentApiTestCase.java index db7ab0ea238..d1fbbd74795 100644 --- a/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusDocumentApiTestCase.java +++ b/documentapi/src/test/java/com/yahoo/documentapi/messagebus/MessageBusDocumentApiTestCase.java @@ -10,20 +10,15 @@ import com.yahoo.documentapi.AsyncParameters; import com.yahoo.documentapi.AsyncSession; import com.yahoo.documentapi.DocumentAccess; import com.yahoo.documentapi.DocumentOperationParameters; -import com.yahoo.documentapi.ProgressToken; import com.yahoo.documentapi.Response; import com.yahoo.documentapi.VisitorParameters; import com.yahoo.documentapi.VisitorSession; -import com.yahoo.documentapi.messagebus.protocol.CreateVisitorReply; -import com.yahoo.documentapi.messagebus.protocol.DocumentMessage; -import com.yahoo.documentapi.messagebus.protocol.DocumentProtocol; + import com.yahoo.documentapi.test.AbstractDocumentApiTestCase; import com.yahoo.jrt.ListenFailedException; import com.yahoo.jrt.slobrok.server.Slobrok; import com.yahoo.messagebus.AllPassThrottlePolicy; import com.yahoo.messagebus.DynamicThrottlePolicy; -import com.yahoo.messagebus.Message; -import com.yahoo.messagebus.Reply; import com.yahoo.messagebus.ThrottlePolicy; import com.yahoo.messagebus.network.Identity; import org.junit.After; @@ -36,7 +31,6 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; @@ -70,7 +64,7 @@ public class MessageBusDocumentApiTestCase extends AbstractDocumentApiTestCase { params.setTraceLevel(9); access = new MessageBusDocumentAccess(params); - destination = new VisitableDestination(slobrokConfigId, params.getDocumentManagerConfigId()); + destination = new Destination(slobrokConfigId, params.getDocumentManagerConfigId()); } @After @@ -80,25 +74,6 @@ public class MessageBusDocumentApiTestCase extends AbstractDocumentApiTestCase { slobrok.stop(); } - private static class VisitableDestination extends Destination { - private VisitableDestination(String slobrokConfigId, String documentManagerConfigId) { - super(slobrokConfigId, documentManagerConfigId); - } - - public void handleMessage(Message msg) { - if (msg.getType() == DocumentProtocol.MESSAGE_CREATEVISITOR) { - Reply reply = ((DocumentMessage)msg).createReply(); - msg.swapState(reply); - CreateVisitorReply visitorReply = (CreateVisitorReply)reply; - visitorReply.setLastBucket(ProgressToken.FINISHED_BUCKET); - sendReply(reply); - } else { - super.handleMessage(msg); - } - } - } - - @Test public void requireThatVisitorSessionWorksWithMessageBus() throws ParseException, InterruptedException { VisitorParameters parameters = new VisitorParameters("id.user==1234"); @@ -119,16 +94,17 @@ public class MessageBusDocumentApiTestCase extends AbstractDocumentApiTestCase { AsyncSession session = access().createAsyncSession(new AsyncParameters()); DocumentType type = access().getDocumentTypeManager().getDocumentType("music"); Document doc1 = new Document(type, new DocumentId("id:ns:music::1")); + + destination.discard.set(true); assertTrue(session.put(new DocumentPut(doc1), DocumentOperationParameters.parameters() .withResponseHandler(result -> { response.set(result); latch.countDown(); }) - .withDeadline(Instant.now().minusSeconds(1))) + .withDeadline(Instant.now().plusMillis(100))) .isSuccess()); assertTrue(latch.await(60, TimeUnit.SECONDS)); - assertNotNull(response.get()); assertEquals(Response.Outcome.TIMEOUT, response.get().outcome()); session.destroy(); } diff --git a/documentapi/src/test/java/com/yahoo/documentapi/test/AbstractDocumentApiTestCase.java b/documentapi/src/test/java/com/yahoo/documentapi/test/AbstractDocumentApiTestCase.java index a004ad368e0..001a5d284e2 100644 --- a/documentapi/src/test/java/com/yahoo/documentapi/test/AbstractDocumentApiTestCase.java +++ b/documentapi/src/test/java/com/yahoo/documentapi/test/AbstractDocumentApiTestCase.java @@ -173,4 +173,5 @@ public abstract class AbstractDocumentApiTestCase { latch.countDown(); } } + } diff --git a/documentapi/test/cfg/testdoc.cfg b/documentapi/test/cfg/testdoc.cfg index f218ddcd3b4..aa4ef5b96d6 100644 --- a/documentapi/test/cfg/testdoc.cfg +++ b/documentapi/test/cfg/testdoc.cfg @@ -1,97 +1,115 @@ -enablecompression false -datatype[7] -datatype[0].id 666999 -datatype[0].arraytype[0] -datatype[0].weightedsettype[0] -datatype[0].structtype[1] -datatype[0].structtype[0].name ronja -datatype[0].structtype[0].version 0 -datatype[0].structtype[0].field[1] -datatype[0].structtype[0].field[0].name longfield -datatype[0].structtype[0].field[0].id[0] -datatype[0].structtype[0].field[0].datatype 4 -datatype[0].documenttype[0] -datatype[1].id -1636745577 -datatype[1].arraytype[0] -datatype[1].weightedsettype[0] -datatype[1].structtype[1] -datatype[1].structtype[0].name testdoc.header -datatype[1].structtype[0].version 0 -datatype[1].structtype[0].field[10] -datatype[1].structtype[0].field[0].name floatfield -datatype[1].structtype[0].field[0].id[0] -datatype[1].structtype[0].field[0].datatype 1 -datatype[1].structtype[0].field[1].name stringfield -datatype[1].structtype[0].field[1].id[0] -datatype[1].structtype[0].field[1].datatype 2 -datatype[1].structtype[0].field[2].name longfield -datatype[1].structtype[0].field[2].id[0] -datatype[1].structtype[0].field[2].datatype 4 -datatype[1].structtype[0].field[3].name urifield -datatype[1].structtype[0].field[3].id[0] -datatype[1].structtype[0].field[3].datatype 10 -datatype[1].structtype[0].field[4].name intfield -datatype[1].structtype[0].field[4].id[0] -datatype[1].structtype[0].field[4].datatype 0 -datatype[1].structtype[0].field[5].name rawfield -datatype[1].structtype[0].field[5].id[0] -datatype[1].structtype[0].field[5].datatype 3 -datatype[1].structtype[0].field[6].name doublefield -datatype[1].structtype[0].field[6].id[0] -datatype[1].structtype[0].field[6].datatype 5 -datatype[1].structtype[0].field[7].name contentfield -datatype[1].structtype[0].field[7].id[0] -datatype[1].structtype[0].field[7].datatype 2 -datatype[1].structtype[0].field[8].name bytefield -datatype[1].structtype[0].field[8].id[0] -datatype[1].structtype[0].field[8].datatype 16 -datatype[1].structtype[0].field[9].name foo -datatype[1].structtype[0].field[9].id[0] -datatype[1].structtype[0].field[9].datatype 666999 -datatype[1].documenttype[0] -datatype[2].id 1878320748 -datatype[2].arraytype[0] -datatype[2].weightedsettype[0] -datatype[2].structtype[1] -datatype[2].structtype[0].name testdoc.body -datatype[2].structtype[0].version 0 -datatype[2].documenttype[0] -datatype[3].id -1175657560 -datatype[3].arraytype[0] -datatype[3].weightedsettype[0] -datatype[3].structtype[0] -datatype[3].documenttype[1] -datatype[3].documenttype[0].name testdoc -datatype[3].documenttype[0].version 0 -datatype[3].documenttype[0].inherits[0] -datatype[3].documenttype[0].headerstruct -1636745577 -datatype[3].documenttype[0].bodystruct 1878320748 -datatype[4].id 192273965 -datatype[4].arraytype[0] -datatype[4].weightedsettype[0] -datatype[4].structtype[1] -datatype[4].structtype[0].name other.header -datatype[4].structtype[0].version 0 -datatype[4].structtype[0].field[1] -datatype[4].structtype[0].field[0].name intfield -datatype[4].structtype[0].field[0].id[0] -datatype[4].structtype[0].field[0].datatype 0 -datatype[4].documenttype[0] -datatype[5].id -72846462 -datatype[5].arraytype[0] -datatype[5].weightedsettype[0] -datatype[5].structtype[1] -datatype[5].structtype[0].name other.body -datatype[5].structtype[0].version 0 -datatype[5].documenttype[0] -datatype[6].id -1146158894 -datatype[6].arraytype[0] -datatype[6].weightedsettype[0] -datatype[6].structtype[0] -datatype[6].documenttype[1] -datatype[6].documenttype[0].name other -datatype[6].documenttype[0].version 0 -datatype[6].documenttype[0].inherits[0] -datatype[6].documenttype[0].headerstruct 192273965 -datatype[6].documenttype[0].bodystruct -72846462 - +doctype[3] +doctype[0].name "document" +doctype[0].idx 10000 +doctype[0].contentstruct 10001 +doctype[0].primitivetype[0].idx 10002 +doctype[0].primitivetype[0].internalid 0 +doctype[0].primitivetype[0].name "int" +doctype[0].primitivetype[1].idx 10003 +doctype[0].primitivetype[1].internalid 5 +doctype[0].primitivetype[1].name "double" +doctype[0].primitivetype[2].idx 10004 +doctype[0].primitivetype[2].internalid 2 +doctype[0].primitivetype[2].name "string" +doctype[0].annotationtype[0].idx 10005 +doctype[0].annotationtype[0].name "proximity_break" +doctype[0].annotationtype[0].internalid 8 +doctype[0].annotationtype[0].datatype 10003 +doctype[0].annotationtype[1].idx 10006 +doctype[0].annotationtype[1].name "normalized" +doctype[0].annotationtype[1].internalid 4 +doctype[0].annotationtype[1].datatype 10004 +doctype[0].annotationtype[2].idx 10007 +doctype[0].annotationtype[2].name "reading" +doctype[0].annotationtype[2].internalid 5 +doctype[0].annotationtype[2].datatype 10004 +doctype[0].annotationtype[3].idx 10008 +doctype[0].annotationtype[3].name "term" +doctype[0].annotationtype[3].internalid 1 +doctype[0].annotationtype[3].datatype 10004 +doctype[0].annotationtype[4].idx 10009 +doctype[0].annotationtype[4].name "transformed" +doctype[0].annotationtype[4].internalid 7 +doctype[0].annotationtype[4].datatype 10004 +doctype[0].annotationtype[5].idx 10010 +doctype[0].annotationtype[5].name "canonical" +doctype[0].annotationtype[5].internalid 3 +doctype[0].annotationtype[5].datatype 10004 +doctype[0].annotationtype[6].idx 10011 +doctype[0].annotationtype[6].name "token_type" +doctype[0].annotationtype[6].internalid 2 +doctype[0].annotationtype[6].datatype 10002 +doctype[0].annotationtype[7].idx 10012 +doctype[0].annotationtype[7].name "special_token" +doctype[0].annotationtype[7].internalid 9 +doctype[0].annotationtype[8].idx 10013 +doctype[0].annotationtype[8].name "stem" +doctype[0].annotationtype[8].internalid 6 +doctype[0].annotationtype[8].datatype 10004 +doctype[0].structtype[0].idx 10001 +doctype[0].structtype[0].name document.header +doctype[1].name "testdoc" +doctype[1].idx 10014 +doctype[1].inherits[0].idx 10000 +doctype[1].contentstruct 10015 +doctype[1].primitivetype[0].idx 10017 +doctype[1].primitivetype[0].internalid 3 +doctype[1].primitivetype[0].name "raw" +doctype[1].primitivetype[1].idx 10018 +doctype[1].primitivetype[1].internalid 16 +doctype[1].primitivetype[1].name "byte" +doctype[1].primitivetype[2].idx 10019 +doctype[1].primitivetype[2].internalid 1 +doctype[1].primitivetype[2].name "float" +doctype[1].primitivetype[3].idx 10020 +doctype[1].primitivetype[3].internalid 4 +doctype[1].primitivetype[3].name "long" +doctype[1].primitivetype[4].idx 10021 +doctype[1].primitivetype[4].internalid 10 +doctype[1].primitivetype[4].name "uri" +doctype[1].structtype[0].idx 10016 +doctype[1].structtype[0].name ronja +doctype[1].structtype[0].field[0].name "longfield" +doctype[1].structtype[0].field[0].internalid 1589309697 +doctype[1].structtype[0].field[0].type 10020 +doctype[1].structtype[1].idx 10015 +doctype[1].structtype[1].name testdoc.header +doctype[1].structtype[1].field[0].name "floatfield" +doctype[1].structtype[1].field[0].internalid 1055999199 +doctype[1].structtype[1].field[0].type 10019 +doctype[1].structtype[1].field[1].name "stringfield" +doctype[1].structtype[1].field[1].internalid 1182460484 +doctype[1].structtype[1].field[1].type 10004 +doctype[1].structtype[1].field[2].name "longfield" +doctype[1].structtype[1].field[2].internalid 1589309697 +doctype[1].structtype[1].field[2].type 10020 +doctype[1].structtype[1].field[3].name "urifield" +doctype[1].structtype[1].field[3].internalid 628407450 +doctype[1].structtype[1].field[3].type 10021 +doctype[1].structtype[1].field[4].name "intfield" +doctype[1].structtype[1].field[4].internalid 435380425 +doctype[1].structtype[1].field[4].type 10002 +doctype[1].structtype[1].field[5].name "rawfield" +doctype[1].structtype[1].field[5].internalid 172982133 +doctype[1].structtype[1].field[5].type 10017 +doctype[1].structtype[1].field[6].name "doublefield" +doctype[1].structtype[1].field[6].internalid 421343958 +doctype[1].structtype[1].field[6].type 10003 +doctype[1].structtype[1].field[7].name "contentfield" +doctype[1].structtype[1].field[7].internalid 692444884 +doctype[1].structtype[1].field[7].type 10004 +doctype[1].structtype[1].field[8].name "bytefield" +doctype[1].structtype[1].field[8].internalid 1924064342 +doctype[1].structtype[1].field[8].type 10018 +doctype[1].structtype[1].field[9].name "foo" +doctype[1].structtype[1].field[9].internalid 1747747633 +doctype[1].structtype[1].field[9].type 10016 +doctype[2].name "other" +doctype[2].idx 10022 +doctype[2].inherits[0].idx 10000 +doctype[2].contentstruct 10023 +doctype[2].structtype[0].idx 10023 +doctype[2].structtype[0].name other.header +doctype[2].structtype[0].field[0].name "intfield" +doctype[2].structtype[0].field[0].internalid 435380425 +doctype[2].structtype[0].field[0].type 10002 |