cleanup solr schema
authorJan Szejko <janek37@gmail.com>
Wed, 21 Feb 2018 10:18:20 +0000 (11:18 +0100)
committerJan Szejko <janek37@gmail.com>
Wed, 21 Feb 2018 10:18:20 +0000 (11:18 +0100)
doc/schema.xml
src/search/index.py

index ccf9bd5..38d6eda 100644 (file)
 
    <field name="book_id" type="int" indexed="true" stored="true" />
    <field name="parent_id" type="int" indexed="false" stored="true" />
-   <field name="slug" type="text_general" stored="false" indexed="true" omitNorms="true"/> <!-- no norms -->
-   <field name="tags" type="lowercase" stored="false" indexed="true" multiValued="true"/>
+   <field name="slug" type="lowercase" stored="false" indexed="true" omitNorms="true"/> <!-- no norms -->
    <field name="is_book" type="boolean" stored="false" indexed="true"/>
-   <field name="authors" type="text_general" stored="false" indexed="true" multiValued="true" termPositions="true" termVectors="true"/>
-   <field name="translators" type="text_general" stored="false" indexed="true" multiValued="true" termPositions="true" termVectors="true" />
+   <field name="authors" type="text_pl_nonstop" stored="false" indexed="true" multiValued="true" termPositions="true" termVectors="true"/>
+   <field name="translators" type="text_pl_nonstop" stored="false" indexed="false" multiValued="true" />
    <field name="title" type="text_pl_nonstop" stored="false" indexed="true"/>
-   <field name="title_orig" type="lowercase" stored="false" indexed="true"/>
 <!--   <field name="published_date" type="tdate" stored="false" indexed="true"/>-->
    <field name="published_date" type="string" stored="true" indexed="true"/>
 
 
   <copyField source="themes" dest="themes_pl"/>
   <copyField source="tag_name" dest="tag_name_pl"/>
-  <copyField source="title" dest="title_orig"/>
 
   <copyField source="translators" dest="metadata"/>
   <copyField source="epochs" dest="metadata"/>
index 1026014..b94d8f6 100644 (file)
@@ -304,7 +304,6 @@ class Index(SolrIndex):
             book_info = dcparser.parse(open(book.xml_file.path))
 
         fields['slug'] = book.slug
-        fields['tags'] = [t.name for t in book.tags]
         fields['is_book'] = True
 
         # validator, name