Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fixes to schema

Michael Peter Christen58e1e6fa2bed
diff --git a/htroot/api/schema.xml b/htroot/api/schema.xml
index 08c33c193..1cac45be8 100644
--- a/htroot/api/schema.xml
+++ b/htroot/api/schema.xml
@@ -55,6 +55,9 @@
</types>
<fields>
+ <field name="_version_" type="long" indexed="true" stored="true"/> <!-- a mandatory solr field used for operation in SolrCloud -->
+ <field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/> <!-- this is default in solrconfix.xml; not used but you get errors when not defining it -->
+
#{fields}#
<!-- #[comment]# -->
<field name="#[solrname]#" type="#[type]#"#(indexedChecked)#:: indexed="true"#(/indexedChecked)##(storedChecked)#:: stored="true"#(/storedChecked)##(multiValuedChecked)#:: multiValued="true"#(/multiValuedChecked)##(omitNormsChecked)#:: omitNorms="true"#(/omitNormsChecked)#/>
@@ -68,5 +71,8 @@
<uniqueKey>#[solruniquekey]#</uniqueKey>
<defaultSearchField>#[solrdefaultsearchfield]#</defaultSearchField>
<solrQueryParser defaultOperator="AND"/>
+
+ <!-- if you are using a search client using the default search field "text", then use this line to get to all indexed documents -->
+ <!-- <copyField source="*_t" dest="text" maxChars="3000"/> -->
</schema>
diff --git a/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java b/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java
index 86b113ec4..0804b90b4 100644
--- a/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java
+++ b/source/net/yacy/cora/federate/solr/connector/AbstractSolrConnector.java
@@ -59,14 +59,15 @@ public abstract class AbstractSolrConnector implements SolrConnector {
static {
catchallQuery.setQuery("*:*");
catchallQuery.setFields(CollectionSchema.id.getSolrFieldName());
- catchallQuery.setRows(1);
+ catchallQuery.setRows(0);
catchallQuery.setStart(0);
}
public final static SolrQuery catchSuccessQuery = new SolrQuery();
static {
- catchSuccessQuery.setQuery("-" + CollectionSchema.failreason_t.getSolrFieldName() + ":[* TO *]");
+ //catchSuccessQuery.setQuery("-" + CollectionSchema.failreason_t.getSolrFieldName() + ":[* TO *]");
+ catchSuccessQuery.setQuery("*:*"); // failreason_t is only available for core collection1
catchSuccessQuery.setFields(CollectionSchema.id.getSolrFieldName());
- catchSuccessQuery.setRows(1);
+ catchSuccessQuery.setRows(0);
catchSuccessQuery.setStart(0);
}
private final static int pagesize = 100;