turned author_s into the multi-valued field author_sxt

pull/1/head
Michael Peter Christen 12 years ago
parent f1a4feda3e
commit 8651ec35fe

@ -116,7 +116,7 @@
<field name="description" type="text_general" indexed="true" stored="true"/> <field name="description" type="text_general" indexed="true" stored="true"/>
<field name="comments" type="text_general" indexed="true" stored="true"/> <field name="comments" type="text_general" indexed="true" stored="true"/>
<field name="author" type="text_general" indexed="true" stored="true"/> <field name="author" type="text_general" indexed="true" stored="true"/>
<copyField source="author" dest="author_s" maxChars="100" /> <copyField source="author" dest="author_sxt" maxChars="100" />
<field name="keywords" type="text_general" indexed="true" stored="true"/> <field name="keywords" type="text_general" indexed="true" stored="true"/>
<field name="category" type="text_general" indexed="true" stored="true"/> <field name="category" type="text_general" indexed="true" stored="true"/>
<field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/> <field name="content_type" type="string" indexed="true" stored="true" multiValued="true"/>

@ -65,7 +65,7 @@ public enum YaCySchema implements Schema {
coordinate_p(SolrType.location, true, true, false, "point in degrees of latitude,longitude as declared in WSG84"), coordinate_p(SolrType.location, true, true, false, "point in degrees of latitude,longitude as declared in WSG84"),
ip_s(SolrType.string, true, true, false, "ip of host of url (after DNS lookup)"), ip_s(SolrType.string, true, true, false, "ip of host of url (after DNS lookup)"),
author(SolrType.text_general, true, true, false, "content of author-tag"), author(SolrType.text_general, true, true, false, "content of author-tag"),
author_s(SolrType.string, true, true, false, "content of author-tag as copy-field from author. This is used for facet generation"), author_sxt(SolrType.string, true, true, true, "content of author-tag as copy-field from author. This is used for facet generation"),
description(SolrType.text_general, true, true, false, "content of description-tag"), description(SolrType.text_general, true, true, false, "content of description-tag"),
description_unique_b(SolrType.bool, true, true, false, "flag shows if description is unique in the whole index; if yes and another document appears with same description, the unique-flag is set to false"), description_unique_b(SolrType.bool, true, true, false, "flag shows if description is unique in the whole index; if yes and another document appears with same description, the unique-flag is set to false"),
keywords(SolrType.text_general, true, true, false, "content of keywords tag; words are separated by space"), keywords(SolrType.text_general, true, true, false, "content of keywords tag; words are separated by space"),

@ -87,7 +87,7 @@ public final class QueryParams {
YaCySchema.host_s.getSolrFieldName(), YaCySchema.host_s.getSolrFieldName(),
YaCySchema.url_protocol_s.getSolrFieldName(), YaCySchema.url_protocol_s.getSolrFieldName(),
YaCySchema.url_file_ext_s.getSolrFieldName(), YaCySchema.url_file_ext_s.getSolrFieldName(),
YaCySchema.author_s.getSolrFieldName()}; YaCySchema.author_sxt.getSolrFieldName()};
private static final int defaultmaxfacets = 30; private static final int defaultmaxfacets = 30;
@ -471,7 +471,7 @@ public final class QueryParams {
// add author facets // add author facets
if (this.author != null && this.author.length() > 0) { if (this.author != null && this.author.length() > 0) {
fq.append(" AND ").append(YaCySchema.author_s.getSolrFieldName()).append(":\"").append(this.author).append('\"'); fq.append(" AND ").append(YaCySchema.author_sxt.getSolrFieldName()).append(":\"").append(this.author).append('\"');
} }
if (this.protocol != null) { if (this.protocol != null) {

@ -526,7 +526,7 @@ public final class SearchEvent {
} }
if (this.authorNavigator != null) { if (this.authorNavigator != null) {
fcts = facets.get(YaCySchema.author_s.getSolrFieldName()); fcts = facets.get(YaCySchema.author_sxt.getSolrFieldName());
if (fcts != null) this.authorNavigator.inc(fcts); if (fcts != null) this.authorNavigator.inc(fcts);
} }

Loading…
Cancel
Save