Skip to content

Commit

Permalink
18717 small bug fix (#259)
Browse files Browse the repository at this point in the history
* keep periods in value query

Signed-off-by: Kial Jinnah <kialj876@gmail.com>

* version update

Signed-off-by: Kial Jinnah <kialj876@gmail.com>

---------

Signed-off-by: Kial Jinnah <kialj876@gmail.com>
  • Loading branch information
kialj876 authored Mar 25, 2024
1 parent 7100ca2 commit ee405e3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions search-api/src/search_api/request_handlers/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,6 @@ def business_search(params: SearchParams):
],
[SolrField.NAME_Q.value]
)
# TODO: add nested parties query
# NB: keeping for future: build a query based on child values and return parent doc
# child_query = Solr.build_child_query(query,
# SolrField.PARTIES,
# [SolrField.PARTY_NAME_Q,SolrField.PARTY_NAME_STEM_AGRO],
# SolrField.PARTY_NAME_SINGLE)
# terms = query.split()
# child_filter = f'"{SolrField.PARTY_NAME_SINGLE}:{terms[0]}'
# for term in terms[1:]:
# child_filter += f' AND {SolrField.PARTY_NAME_SINGLE}:{term}'
# child_filter += '"'
# child_query += solr.nest_fields_party.format(filter=child_filter)

# facets
solr_query_params['facet'] = 'on'
Expand Down
2 changes: 1 addition & 1 deletion search-api/src/search_api/services/solr/solr.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ def parse_facets(facet_data: Dict) -> Dict:
def prep_query_str(query: str) -> str:
"""Return query string prepped for solr call."""
# replace solr specific special chars
rmv_spec_chars_rgx = r'([\[\]!()\"~*?:/\\={}^%`#|<>,.@$;_\-])'
rmv_spec_chars_rgx = r'([\[\]!()\"~*?:/\\={}^%`#|<>,@$;_\-])'
handled_spec_chars_rgx = r'([&+]+)'
query = re.sub(rmv_spec_chars_rgx, ' ', query.lower())
return re.sub(handled_spec_chars_rgx, r' \\\1 ', query) if not query.isspace() else r'\*'
2 changes: 1 addition & 1 deletion search-api/src/search_api/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
Development release segment: .devN
"""

__version__ = '1.0.9.post1' # pylint: disable=invalid-name
__version__ = '1.0.10' # pylint: disable=invalid-name

0 comments on commit ee405e3

Please sign in to comment.