<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0-google-v4) on Mon Dec 12 14:51:09 PST 2011 --> <TITLE> Index </TITLE> <META NAME="date" CONTENT="2011-12-12"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../dev_javadoc.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Index"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../com/google/appengine/api/search/FieldExpression.Builder.html" title="class in com.google.appengine.api.search"><B>PREV CLASS</B></A> <A HREF="../../../../../com/google/appengine/api/search/IndexChecker.html" title="class in com.google.appengine.api.search"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/google/appengine/api/search/Index.html" target="_top"><B>FRAMES</B></A> <A HREF="Index.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> com.google.appengine.api.search</FONT> <BR> Interface Index</H2> <HR> <DL> <DT><PRE>public interface <B>Index</B></DL> </PRE> <P> An Index allows synchronous adding and deleting of <A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search"><CODE>Documents</CODE></A> as well as synchronous searching for Documents. The following code fragment shows how to add documents, then search the index for documents matching a query. <p> <pre> // Get the index manager for the default namespace IndexManager indexManager = IndexManagerFactory.newIndexManager(); // Get the index. If not yet created, create it. Index index = indexManager.getIndex( IndexSpec.newBuilder() .setIndexName("indexName") .setConsistency(Consistency.PER_DOCUMENT)); // Create a document. Document d = Document.newBuilder() .setId("documentId") .addField(Field.newBuilder().setName("subject").setText("my first email")) .addField(Field.newBuilder().setName("body") .setHTML("<html>some content here</html>") .build(); // Add the document. try { index.add(d); } catch (AddDocumentsException e) { if (StatusCode.TRANSIENT_ERROR.equals(e.getOperationResult().getCode())) { // retry adding document } } // Query the index. try { SearchResponse response = index.search("subject:first body:here"); // Iterate through the search results. for (SearchResult result : response) { Document doc = result.getDocument(); } } catch (SearchException e) { if (StatusCode.TRANSIENT_ERROR.equals(e.getOperationResult().getCode())) { // retry } } </pre> <P> <P> <HR> <P> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#add(com.google.appengine.api.search.Document)">add</A></B>(<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A> document)</CODE> <BR> Add the document, update the document if it is already present.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#add(java.lang.Iterable)">add</A></B>(java.lang.Iterable<<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A>> documents)</CODE> <BR> Adds the collection of documents.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#addAsync(com.google.appengine.api.search.Document)">addAsync</A></B>(<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A> document)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#addAsync(java.lang.Iterable)">addAsync</A></B>(java.lang.Iterable<<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A>> documents)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#deleteDocument(java.lang.String)">deleteDocument</A></B>(java.lang.String documentId)</CODE> <BR> Delete the document with the corresponding document id from the index if it is in the index.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.concurrent.Future<java.lang.Void></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#deleteDocumentAsync(java.lang.String)">deleteDocumentAsync</A></B>(java.lang.String documentId)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#deleteDocuments(java.lang.Iterable)">deleteDocuments</A></B>(java.lang.Iterable<java.lang.String> documentIds)</CODE> <BR> Delete documents from the index which have IDs in the <code>documentIds</code> collection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.concurrent.Future<java.lang.Void></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#deleteDocumentsAsync(java.lang.Iterable)">deleteDocumentsAsync</A></B>(java.lang.Iterable<java.lang.String> documentIds)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/search/Consistency.html" title="enum in com.google.appengine.api.search">Consistency</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#getConsistency()">getConsistency</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#getName()">getName</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.lang.String</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#getNamespace()">getNamespace</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/search/Schema.html" title="class in com.google.appengine.api.search">Schema</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#getSchema()">getSchema</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/search/ListDocumentsResponse.html" title="class in com.google.appengine.api.search">ListDocumentsResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#listDocuments(com.google.appengine.api.search.ListDocumentsRequest)">listDocuments</A></B>(<A HREF="../../../../../com/google/appengine/api/search/ListDocumentsRequest.html" title="class in com.google.appengine.api.search">ListDocumentsRequest</A> request)</CODE> <BR> Lists the index's documents, in document Id order.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/ListDocumentsResponse.html" title="class in com.google.appengine.api.search">ListDocumentsResponse</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#listDocumentsAsync(com.google.appengine.api.search.ListDocumentsRequest)">listDocumentsAsync</A></B>(<A HREF="../../../../../com/google/appengine/api/search/ListDocumentsRequest.html" title="class in com.google.appengine.api.search">ListDocumentsRequest</A> request)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#search(com.google.appengine.api.search.SearchRequest)">search</A></B>(<A HREF="../../../../../com/google/appengine/api/search/SearchRequest.html" title="class in com.google.appengine.api.search">SearchRequest</A> request)</CODE> <BR> Search the index for documents matching the query in the request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#search(java.lang.String)">search</A></B>(java.lang.String query)</CODE> <BR> Search the index for documents matching the query.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#searchAsync(com.google.appengine.api.search.SearchRequest)">searchAsync</A></B>(<A HREF="../../../../../com/google/appengine/api/search/SearchRequest.html" title="class in com.google.appengine.api.search">SearchRequest</A> request)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A>></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../com/google/appengine/api/search/Index.html#searchAsync(java.lang.String)">searchAsync</A></B>(java.lang.String query)</CODE> <BR> </TD> </TR> </TABLE> <P> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getName()"><!-- --></A><H3> getName</H3> <PRE> java.lang.String <B>getName</B>()</PRE> <DL> <DD><DL> <DT><B>Returns:</B><DD>the name of the index</DL> </DD> </DL> <HR> <A NAME="getNamespace()"><!-- --></A><H3> getNamespace</H3> <PRE> java.lang.String <B>getNamespace</B>()</PRE> <DL> <DD><DL> <DT><B>Returns:</B><DD>the namespace of the index name</DL> </DD> </DL> <HR> <A NAME="getConsistency()"><!-- --></A><H3> getConsistency</H3> <PRE> <A HREF="../../../../../com/google/appengine/api/search/Consistency.html" title="enum in com.google.appengine.api.search">Consistency</A> <B>getConsistency</B>()</PRE> <DL> <DD><DL> <DT><B>Returns:</B><DD>the consistency mode of this index</DL> </DD> </DL> <HR> <A NAME="deleteDocumentAsync(java.lang.String)"><!-- --></A><H3> deleteDocumentAsync</H3> <PRE> java.util.concurrent.Future<java.lang.Void> <B>deleteDocumentAsync</B>(java.lang.String documentId)</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/search/Index.html#deleteDocument(java.lang.String)"><CODE>deleteDocument(String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="deleteDocumentsAsync(java.lang.Iterable)"><!-- --></A><H3> deleteDocumentsAsync</H3> <PRE> java.util.concurrent.Future<java.lang.Void> <B>deleteDocumentsAsync</B>(java.lang.Iterable<java.lang.String> documentIds)</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/search/Index.html#deleteDocuments(java.lang.Iterable)"><CODE>deleteDocuments(Iterable)</CODE></A></DL> </DD> </DL> <HR> <A NAME="addAsync(com.google.appengine.api.search.Document)"><!-- --></A><H3> addAsync</H3> <PRE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A>> <B>addAsync</B>(<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A> document)</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/search/Index.html#add(com.google.appengine.api.search.Document)"><CODE>add(Document)</CODE></A></DL> </DD> </DL> <HR> <A NAME="addAsync(java.lang.Iterable)"><!-- --></A><H3> addAsync</H3> <PRE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A>> <B>addAsync</B>(java.lang.Iterable<<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A>> documents)</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/search/Index.html#add(java.lang.Iterable)"><CODE>add(Iterable)</CODE></A></DL> </DD> </DL> <HR> <A NAME="searchAsync(java.lang.String)"><!-- --></A><H3> searchAsync</H3> <PRE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A>> <B>searchAsync</B>(java.lang.String query)</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/search/Index.html#search(java.lang.String)"><CODE>search(String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="searchAsync(com.google.appengine.api.search.SearchRequest)"><!-- --></A><H3> searchAsync</H3> <PRE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A>> <B>searchAsync</B>(<A HREF="../../../../../com/google/appengine/api/search/SearchRequest.html" title="class in com.google.appengine.api.search">SearchRequest</A> request)</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/search/Index.html#search(com.google.appengine.api.search.SearchRequest)"><CODE>search(SearchRequest)</CODE></A></DL> </DD> </DL> <HR> <A NAME="listDocumentsAsync(com.google.appengine.api.search.ListDocumentsRequest)"><!-- --></A><H3> listDocumentsAsync</H3> <PRE> java.util.concurrent.Future<<A HREF="../../../../../com/google/appengine/api/search/ListDocumentsResponse.html" title="class in com.google.appengine.api.search">ListDocumentsResponse</A>> <B>listDocumentsAsync</B>(<A HREF="../../../../../com/google/appengine/api/search/ListDocumentsRequest.html" title="class in com.google.appengine.api.search">ListDocumentsRequest</A> request)</PRE> <DL> <DD><DL> <DT><B>See Also:</B><DD><A HREF="../../../../../com/google/appengine/api/search/Index.html#listDocuments(com.google.appengine.api.search.ListDocumentsRequest)"><CODE>listDocuments(ListDocumentsRequest)</CODE></A></DL> </DD> </DL> <HR> <A NAME="deleteDocument(java.lang.String)"><!-- --></A><H3> deleteDocument</H3> <PRE> void <B>deleteDocument</B>(java.lang.String documentId)</PRE> <DL> <DD>Delete the document with the corresponding document id from the index if it is in the index. If no document exists for the document id, then the request is ignored. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>documentId</CODE> - the id of the document to delete <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/DeleteDocumentsException.html" title="class in com.google.appengine.api.search">DeleteDocumentsException</A></CODE> - if there is a failure in the search service deleting documents <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the document id is invalid</DL> </DD> </DL> <HR> <A NAME="deleteDocuments(java.lang.Iterable)"><!-- --></A><H3> deleteDocuments</H3> <PRE> void <B>deleteDocuments</B>(java.lang.Iterable<java.lang.String> documentIds)</PRE> <DL> <DD>Delete documents from the index which have IDs in the <code>documentIds</code> collection. If the index does not have a document for a given document id, that is ignored. For globally consistent indexes either all or none of documents are deleted. For per-document consistent indexes, if some documents are not successfully deleted, their IDs are reported in the <A HREF="../../../../../com/google/appengine/api/search/DeleteDocumentsException.html" title="class in com.google.appengine.api.search"><CODE>DeleteDocumentsException</CODE></A> <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>documentIds</CODE> - the IDs of documents which are to be deleted from the index <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/DeleteDocumentsException.html" title="class in com.google.appengine.api.search">DeleteDocumentsException</A></CODE> - if there is a failure in the search service deleting documents <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the document id collection is invalid or larger than <A HREF="../../../../../com/google/appengine/api/search/IndexChecker.html#MAXIMUM_DOCS_PER_REQUEST"><CODE>IndexChecker.MAXIMUM_DOCS_PER_REQUEST</CODE></A>.</DL> </DD> </DL> <HR> <A NAME="add(com.google.appengine.api.search.Document)"><!-- --></A><H3> add</H3> <PRE> <A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A> <B>add</B>(<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A> document)</PRE> <DL> <DD>Add the document, update the document if it is already present. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>document</CODE> - the document to add to the index <DT><B>Returns:</B><DD>an <A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search"><CODE>AddDocumentsResponse</CODE></A> containing the result of the add operation indicating success or failure as well as the document id. The search service will allocate document ids for documents which have none provided <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/AddDocumentsException.html" title="class in com.google.appengine.api.search">AddDocumentsException</A></CODE> - if there is a failure in the search service adding documents <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the document is invalid</DL> </DD> </DL> <HR> <A NAME="add(java.lang.Iterable)"><!-- --></A><H3> add</H3> <PRE> <A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search">AddDocumentsResponse</A> <B>add</B>(java.lang.Iterable<<A HREF="../../../../../com/google/appengine/api/search/Document.html" title="class in com.google.appengine.api.search">Document</A>> documents)</PRE> <DL> <DD>Adds the collection of documents. If any of the documents are already in the index, then update them with their corresponding fresh document. If any of the documents fail to be added, then none of the documents will be added. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>documents</CODE> - the documents to add to the index <DT><B>Returns:</B><DD>an <A HREF="../../../../../com/google/appengine/api/search/AddDocumentsResponse.html" title="class in com.google.appengine.api.search"><CODE>AddDocumentsResponse</CODE></A> containing the results of the add operations indicating success or failure as well as the document Ids. The search service will allocate document ids for documents which have none provided <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/AddDocumentsException.html" title="class in com.google.appengine.api.search">AddDocumentsException</A></CODE> - if there is a failure in the search service adding documents <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the document collection is invalid or larger than <A HREF="../../../../../com/google/appengine/api/search/IndexChecker.html#MAXIMUM_DOCS_PER_REQUEST"><CODE>IndexChecker.MAXIMUM_DOCS_PER_REQUEST</CODE></A>.</DL> </DD> </DL> <HR> <A NAME="search(java.lang.String)"><!-- --></A><H3> search</H3> <PRE> <A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A> <B>search</B>(java.lang.String query)</PRE> <DL> <DD>Search the index for documents matching the query. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>query</CODE> - the query to match against documents in the index <DT><B>Returns:</B><DD>a <A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search"><CODE>SearchResponse</CODE></A> containing the search results <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the query is null <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/SearchQueryException.html" title="class in com.google.appengine.api.search">SearchQueryException</A></CODE> - if the query is invalid <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/SearchException.html" title="class in com.google.appengine.api.search">SearchException</A></CODE> - if there is a failure in the search service performing the search</DL> </DD> </DL> <HR> <A NAME="search(com.google.appengine.api.search.SearchRequest)"><!-- --></A><H3> search</H3> <PRE> <A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search">SearchResponse</A> <B>search</B>(<A HREF="../../../../../com/google/appengine/api/search/SearchRequest.html" title="class in com.google.appengine.api.search">SearchRequest</A> request)</PRE> <DL> <DD>Search the index for documents matching the query in the request. The search request must specify a query, how many documents are requested, how the results are to be sorted, scored and which fields are to be returned. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>request</CODE> - the fully specified search request <DT><B>Returns:</B><DD>a <A HREF="../../../../../com/google/appengine/api/search/SearchResponse.html" title="class in com.google.appengine.api.search"><CODE>SearchResponse</CODE></A> containing the search results <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the search request is invalid <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/SearchQueryException.html" title="class in com.google.appengine.api.search">SearchQueryException</A></CODE> - if the query is invalid <DD><CODE><A HREF="../../../../../com/google/appengine/api/search/SearchException.html" title="class in com.google.appengine.api.search">SearchException</A></CODE> - if there is a failure in the search service performing the search</DL> </DD> </DL> <HR> <A NAME="listDocuments(com.google.appengine.api.search.ListDocumentsRequest)"><!-- --></A><H3> listDocuments</H3> <PRE> <A HREF="../../../../../com/google/appengine/api/search/ListDocumentsResponse.html" title="class in com.google.appengine.api.search">ListDocumentsResponse</A> <B>listDocuments</B>(<A HREF="../../../../../com/google/appengine/api/search/ListDocumentsRequest.html" title="class in com.google.appengine.api.search">ListDocumentsRequest</A> request)</PRE> <DL> <DD>Lists the index's documents, in document Id order. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>request</CODE> - contains various options restricting which documents are returned. <DT><B>Returns:</B><DD>a <A HREF="../../../../../com/google/appengine/api/search/ListDocumentsResponse.html" title="class in com.google.appengine.api.search"><CODE>ListDocumentsResponse</CODE></A> containing a list of documents from the index <DT><B>Throws:</B> <DD><CODE>java.lang.IllegalArgumentException</CODE> - if the list documents request is invalid</DL> </DD> </DL> <HR> <A NAME="getSchema()"><!-- --></A><H3> getSchema</H3> <PRE> <A HREF="../../../../../com/google/appengine/api/search/Schema.html" title="class in com.google.appengine.api.search">Schema</A> <B>getSchema</B>()</PRE> <DL> <DD><DL> <DT><B>Returns:</B><DD>the <A HREF="../../../../../com/google/appengine/api/search/Schema.html" title="class in com.google.appengine.api.search"><CODE>Schema</CODE></A> describing supported document field names and <CODE>FieldTypes</CODE> supported for those field names. This schema will only be populated if the <A HREF="../../../../../com/google/appengine/api/search/ListIndexesRequest.html#isSchemaFetched()"><CODE>ListIndexesRequest.isSchemaFetched()</CODE></A> is set to true on an <A HREF="../../../../../com/google/appengine/api/search/IndexManager.html#listIndexes(com.google.appengine.api.search.ListIndexesRequest)"><CODE>IndexManager.listIndexes(com.google.appengine.api.search.ListIndexesRequest)</CODE></A> request</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../com/google/appengine/api/search/FieldExpression.Builder.html" title="class in com.google.appengine.api.search"><B>PREV CLASS</B></A> <A HREF="../../../../../com/google/appengine/api/search/IndexChecker.html" title="class in com.google.appengine.api.search"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?com/google/appengine/api/search/Index.html" target="_top"><B>FRAMES</B></A> <A HREF="Index.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>