File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
openlibrary/plugins/worksearch/schemes Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ class EditionSearchScheme(SearchScheme):
3131 "publish_year" ,
3232 "language" ,
3333 "publisher_facet" ,
34+ "acquisition" ,
3435 }
3536 )
3637 non_solr_fields = frozenset ()
Original file line number Diff line number Diff line change 1313import infogami
1414from openlibrary .plugins .upstream .utils import convert_iso_to_marc
1515from openlibrary .plugins .worksearch .schemes import SearchScheme
16+ from openlibrary .plugins .worksearch .schemes .editions import EditionSearchScheme
1617from openlibrary .solr .query_utils import (
1718 EmptyTreeError ,
1819 fully_escape_query ,
@@ -237,9 +238,15 @@ class WorkSearchScheme(SearchScheme):
237238
238239 def is_search_field (self , field : str ):
239240 # New variable introduced to prevent rewriting the input.
240- if field .startswith (( 'work.' , 'edition.' ) ):
241+ if field .startswith ('work.' ):
241242 return self .is_search_field (field .partition ("." )[2 ])
242- return super ().is_search_field (field ) or field .startswith ('id_' )
243+ if field .startswith ('edition.' ):
244+ return EditionSearchScheme ().is_search_field (field .partition ("." )[2 ])
245+ return (
246+ super ().is_search_field (field )
247+ or field .startswith ('id_' )
248+ or EditionSearchScheme ().is_search_field (field )
249+ )
243250
244251 def transform_user_query (
245252 self , user_query : str , q_tree : luqum .tree .Item
You can’t perform that action at this time.
0 commit comments