Changeset 6284
- Timestamp:
- 06/05/15 15:05:33 (9 years ago)
- Location:
- vlo/trunk
- Files:
-
- 13 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk
- Property svn:mergeinfo changed
/vlo/branches/vlo-3.2-ticket575 merged: 6112,6160,6188 /vlo/branches/vlo-ticket761 merged: 6189,6267,6271-6272,6277-6281,6283
- Property svn:mergeinfo changed
-
vlo/trunk/UPGRADE.txt
- Property svn:mergeinfo changed
/vlo/branches/vlo-3.2-ticket575/UPGRADE.txt (added) merged: 6160 /vlo/branches/vlo-ticket761/UPGRADE.txt (added) merged: 6267
- Property svn:mergeinfo changed
-
vlo/trunk/vlo-commons/src/main/resources/VloConfig.xml
r6274 r6284 129 129 <technicalField>_lastSeen</technicalField> 130 130 <technicalField>_componentProfile</technicalField> 131 <technicalField>_hierarchyWeight</technicalField> 132 <technicalField>_hasPart</technicalField> 133 <technicalField>_isPartOf</technicalField> 131 134 </technicalFields> 132 135 … … 160 163 161 164 <!-- makes the score for the result ranking visible in the search results --> 162 <showResultScores> false</showResultScores>165 <showResultScores>true</showResultScores> 163 166 </VloConfig> -
vlo/trunk/vlo-commons/src/test/java/eu/clarin/cmdi/vlo/config/DefaultVloConfigFactoryTest.java
r6274 r6284 928 928 public void testGetTechnicalFields() { 929 929 Set<String> result = config.getTechnicalFields(); 930 assertEquals( 9, result.size());930 assertEquals(12, result.size()); 931 931 } 932 932 -
vlo/trunk/vlo-solr/src/main/solr_conf/solr/collection1/conf/schema.xml
r6212 r6284 416 416 <field name="id" type="string" indexed="true" stored="true" required="true"/> 417 417 <field name="collection" type="string" indexed="true" stored="true" multiValued="true" /> 418 <field name="name" type=" string" indexed="true" stored="true" multiValued="false"/>418 <field name="name" type="text" indexed="true" stored="true" multiValued="false"/> 419 419 <field name="projectName" type="string" indexed="true" stored="true" multiValued="true"/> 420 420 <field name="continent" type="string" indexed="true" stored="true" multiValued="true"/> -
vlo/trunk/vlo-solr/src/main/solr_conf/solr/collection1/conf/solrconfig.xml
r5915 r6284 135 135 </listener> 136 136 --> 137 137 <updateLog/> 138 138 </updateHandler> 139 139 … … 363 363 <!-- default values for query parameters --> 364 364 <lst name="defaults"> 365 <str name="echoParams">explicit</str> 366 <!-- 367 <int name="rows">10</int> 368 <str name="fl">*</str> 369 <str name="version">2.1</str> 370 --> 365 <str name="echoParams">explicit</str> 366 367 <!-- See https://wiki.apache.org/solr/DisMaxQParserPlugin --> 368 <str name="defType">dismax</str> 369 370 <!-- 'Fetch all documents' query --> 371 <str name="q.alt">*:*</str> 372 373 <!-- Query fields --> 374 <str name="qf"> 375 <!-- TODO: Add _languagename field for search purposes? --> 376 name^8 description^4 keywords^2 languageCode^2 country^2 organisation^2 subject^2 collection^1 modality^1 genre^1 continent^.5 id^.1 377 </str> 378 379 <!-- Phrase fields (boost if phrase is matched) --> 380 <str name="pf"> 381 name^2 description 382 </str> 383 384 <!-- Boost fields (boost based on field value regardless of query) --> 385 <str name="bf"> 386 <!-- boost by hierarchy weight (reverse order because lower numbers indicate a higher level --> 387 rord(_hierarchyWeight) 388 <!-- TODO: use bf to boost records with one or more resources? --> 389 </str> 390 391 <!-- 392 <int name="rows">10</int> 393 <str name="fl">*</str> 394 <str name="version">2.1</str> 395 --> 371 396 </lst> 372 397 </requestHandler> … … 905 930 <queryResponseWriter name="phps" class="org.apache.solr.request.PHPSerializedResponseWriter"/> 906 931 907 <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/>908 -->909 910 <!-- XSLT response writer transforms the XML output by any xslt file found911 in Solr's conf/xslt directory. Changes to xslt files are checked for912 every xsltCacheLifetimeSeconds.913 -->914 <queryResponseWriter name="xslt" class="org.apache.solr.response.XSLTResponseWriter">915 <int name="xsltCacheLifetimeSeconds">5</int>916 </queryResponseWriter>917 918 919 <!-- example of registering a query parser920 <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/>921 -->922 923 <!-- example of registering a custom function parser924 <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" />925 -->926 927 <!-- config for the admin interface -->928 <admin>929 <defaultQuery>solr</defaultQuery>930 931 <!-- configure a healthcheck file for servers behind a loadbalancer932 <healthcheck type="file">server-enabled</healthcheck>933 -->934 </admin>932 <queryResponseWriter name="custom" class="com.example.MyResponseWriter"/> 933 --> 934 935 <!-- XSLT response writer transforms the XML output by any xslt file found 936 in Solr's conf/xslt directory. Changes to xslt files are checked for 937 every xsltCacheLifetimeSeconds. 938 --> 939 <queryResponseWriter name="xslt" class="org.apache.solr.response.XSLTResponseWriter"> 940 <int name="xsltCacheLifetimeSeconds">5</int> 941 </queryResponseWriter> 942 943 944 <!-- example of registering a query parser 945 <queryParser name="lucene" class="org.apache.solr.search.LuceneQParserPlugin"/> 946 --> 947 948 <!-- example of registering a custom function parser 949 <valueSourceParser name="myfunc" class="com.mycompany.MyValueSourceParser" /> 950 --> 951 952 <!-- config for the admin interface --> 953 <admin> 954 <defaultQuery>solr</defaultQuery> 955 956 <!-- configure a healthcheck file for servers behind a loadbalancer 957 <healthcheck type="file">server-enabled</healthcheck> 958 --> 959 </admin> 935 960 936 961 </config> -
vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/config/VloSolrSpringConfig.java
r6232 r6284 119 119 FacetConstants.FIELD_CLARIN_PROFILE, 120 120 FacetConstants.FIELD_COMPLETE_METADATA, 121 FacetConstants.FIELD_HIERARCHY_WEIGHT, 122 FacetConstants.FIELD_HAS_PART, 123 FacetConstants.FIELD_IS_PART_OF, 121 124 FacetConstants.FIELD_SOLR_SCORE 122 125 ); -
vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/solr/impl/AbstractSolrQueryFactory.java
r5202 r6284 32 32 public abstract class AbstractSolrQueryFactory { 33 33 34 protected static final String SOLR_SEARCH_ALL = "*:*";34 protected static final String SOLR_SEARCH_ALL = null; 35 35 36 36 protected final void addQueryFacetParameters(final SolrQuery query, QueryFacetsSelection queryFacetsSelections) { … … 40 40 } else { 41 41 // escape query content and wrap in quotes to make literal query 42 query.setQuery( "\"" + ClientUtils.escapeQueryChars(queryString) + "\"");42 query.setQuery(queryString); 43 43 } 44 44 final Map<String, FacetSelection> selections = queryFacetsSelections.getSelection(); -
vlo/trunk/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/service/solr/impl/SolrDocumentQueryFactoryImpl.java
r6190 r6284 42 42 defaultQueryTemplate = new SolrQuery(); 43 43 defaultQueryTemplate.setFields(documentFields.toArray(new String[]{})); 44 // //TODO: qf (all fields with weights - make configurable (later) 45 // defaultQueryTemplate.setParam(DisMaxParams.QF, "name^20 description^10"); 44 46 } 45 47 -
vlo/trunk/vlo-web-app/src/test/java/eu/clarin/cmdi/vlo/service/solr/impl/SearchResultsDaoImplTest.java
r4972 r6284 105 105 query.setStart(0); 106 106 query.setFields(FIELD_NAME, FIELD_ID, FIELD_DESCRIPTION); 107 query.setQuery( "*:*");107 query.setQuery(null); 108 108 109 109 query.setFacet(true); … … 133 133 query.setStart(0); 134 134 query.setFields(FIELD_NAME, FIELD_ID, FIELD_DESCRIPTION); 135 query.setQuery("*:*");136 135 { 137 136 // all documents should match this -
vlo/trunk/vlo-web-app/src/test/java/eu/clarin/cmdi/vlo/service/solr/impl/SolrDocumentQueryFactoryImplTest.java
r5202 r6284 66 66 assertTrue(fields.contains("field2")); 67 67 assertTrue(fields.contains("field3")); 68 assertEquals(" \"query\"", query.getQuery());68 assertEquals("query", query.getQuery()); 69 69 } 70 70 -
vlo/trunk/vlo-web-app/src/test/java/eu/clarin/cmdi/vlo/service/solr/impl/SolrFacetQueryFactoryImplTest.java
r4963 r6284 58 58 59 59 // default: query selects all values 60 assert Equals("*:*",query.getQuery());60 assertNull(query.getQuery()); 61 61 62 62 // no selection -> no filter queries … … 82 82 83 83 // default: query selects all values 84 assert Equals("*:*",query.getQuery());84 assertNull(query.getQuery()); 85 85 86 86 // Only empty selections -> no filter queries … … 107 107 108 108 // default: query selects all values 109 assert Equals("*:*",query.getQuery());109 assertNull(query.getQuery()); 110 110 111 111 // Expecting three filter queries as three values have been selected in total … … 133 133 134 134 assertEquals(1, query.getFilterQueries().length); 135 assertEquals(" \"query\\ string\"", query.getQuery()); //space should be escaped, and query wrapped!135 assertEquals("query string", query.getQuery()); 136 136 137 137 // Expecting three filter queries as three values have been selected in total -
vlo/trunk/vlo-web-app/src/test/resources/solr/collection1/conf/solrconfig.xml
r5916 r6284 72 72 If replication is in use, this should match the replication configuration. --> 73 73 <!-- <dataDir></dataDir>--> 74 74 75 75 <!-- Enables JMX if and only if an existing MBeanServer is found, use this 76 76 if you want to configure JMX through JVM parameters. Remove this to disable … … 359 359 <lst name="defaults"> 360 360 <str name="echoParams">explicit</str> 361 <str name="defType">edismax</str> 362 <str name="q.alt">*:*</str> 361 363 <!-- 362 364 <int name="rows">10</int> … … 401 403 <str name="echoParams">explicit</str> 402 404 <float name="tie">0.01</float> 403 <str name="qf">405 <!-- <str name="qf"> 404 406 text^0.5 features^1.0 name^1.2 sku^1.5 id^10.0 manu^1.1 cat^1.4 407 </str>--> 408 <str name="pf"> 409 name^4 description^2 405 410 </str> 406 <str name="pf"> 407 text^0.2 features^1.1 name^1.5 manu^1.4 manu_exact^1.9 408 </str> 411 <!-- 409 412 <str name="bf"> 410 413 popularity^0.5 recip(price,1,1000,1000)^0.3 … … 416 419 2<-1 5<-2 6<90% 417 420 </str> 418 <int name="ps">100</int> 421 <int name="ps">100</int>--> 419 422 <str name="q.alt">*:*</str> 420 <!-- example highlighter config, enable per-query with hl=true --> 423 <!-- example highlighter config, enable per-query with hl=true 421 424 <str name="hl.fl">text features name</str> 422 <!-- for this field, we want no fragmenting, just highlighting -->425 for this field, we want no fragmenting, just highlighting 423 426 <str name="f.name.hl.fragsize">0</str> 424 <!--instructs Solr to return the field itself if no query terms are425 found -->427 instructs Solr to return the field itself if no query terms are 428 found 426 429 <str name="f.name.hl.alternateField">name</str> 427 <str name="f.text.hl.fragmenter">regex</str> <!--defined below -->430 <str name="f.text.hl.fragmenter">regex</str> defined below --> 428 431 </lst> 429 432 </requestHandler> … … 907 910 every xsltCacheLifetimeSeconds. 908 911 --> 909 <!--<queryResponseWriter name="xslt" class="org.apache.solr.response.XSLTResponseWriter">912 <queryResponseWriter name="xslt" class="org.apache.solr.response.XSLTResponseWriter"> 910 913 <int name="xsltCacheLifetimeSeconds">5</int> 911 </queryResponseWriter> -->914 </queryResponseWriter> 912 915 913 916
Note: See TracChangeset
for help on using the changeset viewer.