From 0e13022147f76a8da54d6f1437f6bcfb9e627dff Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Thu, 26 Apr 2012 15:25:07 +0200 Subject: [PATCH] - enhanced solr field documentation - added xml api button to IndexFederated_p - the solr schema.xml file can be generated by YaCy --- htroot/IndexFederated_p.html | 5 + htroot/IndexFederated_p.java | 11 +- htroot/Network.html | 2 +- htroot/api/schema_p.java | 4 +- .../services/federated/solr/SolrScheme.java | 192 ++++++++++-------- 5 files changed, 120 insertions(+), 94 deletions(-) diff --git a/htroot/IndexFederated_p.html b/htroot/IndexFederated_p.html index 7612ce134..6734799e3 100644 --- a/htroot/IndexFederated_p.html +++ b/htroot/IndexFederated_p.html @@ -5,6 +5,11 @@ #%env/templates/metas.template%# +
+ +API +The solr schema can also be retrieved as xml here. Click the API icon to see the xml. Just copy this xml to solr/conf/schema.xml to configure solr. +
#%env/templates/header.template%# #%env/templates/submenuIndexControl.template%#

Federated Index

diff --git a/htroot/IndexFederated_p.java b/htroot/IndexFederated_p.java index 4a1e82471..2b7c09ca5 100644 --- a/htroot/IndexFederated_p.java +++ b/htroot/IndexFederated_p.java @@ -148,12 +148,19 @@ public class IndexFederated_p { int c = 0; boolean dark = false; ConfigurationSet.Entry entry; + SolrScheme.Field field; while (i.hasNext()) { entry = i.next(); + try { + field = SolrScheme.Field.valueOf(entry.key()); + } catch (IllegalArgumentException e) { + continue; + } + if (field == null) continue; prop.put("scheme_" + c + "_dark", dark ? 1 : 0); dark = !dark; - prop.put("scheme_" + c + "_checked", scheme.contains(entry.key()) ? 1 : 0); + prop.put("scheme_" + c + "_checked", entry.enabled() ? 1 : 0); prop.putHTML("scheme_" + c + "_key", entry.key()); - prop.putHTML("scheme_" + c + "_comment", scheme.commentHeadline(entry.key())); + prop.putHTML("scheme_" + c + "_comment",field.getComment() /*scheme.commentHeadline(entry.key())*/); c++; } prop.put("scheme", c); diff --git a/htroot/Network.html b/htroot/Network.html index 9c6ae0a17..5204aef97 100644 --- a/htroot/Network.html +++ b/htroot/Network.html @@ -45,11 +45,11 @@ } --> +
- API