Skip to content

Commit

Permalink
1118 solr query fl (#596)
Browse files Browse the repository at this point in the history
* update field list in solr and corrected dups in req

* update field list in solr and corrected dups in req

* add missing fields for phoentics bucket
  • Loading branch information
LJTrent authored and rarmitag committed Aug 23, 2019
1 parent 36a58e5 commit 7209e38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
5 changes: 3 additions & 2 deletions api/namex/analytics/solr.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class SolrQueries:
'&q=cobrs_phonetic:{start_str}'
'&wt=json'
'&start={start}&rows={rows}'
'&fl=source,id,name,score,start_date,jurisdiction'
'&sort=score%20desc,txt_starts_with%20asc'
'&fq=-{exact_name}'
'{synonyms_clause}',
Expand All @@ -82,6 +83,7 @@ class SolrQueries:
'&q=dblmetaphone_name:{start_str}'
'&wt=json'
'&start={start}&rows={rows}'
'&fl=source,id,name,score,start_date,jurisdiction'
'&sort=score%20desc,txt_starts_with%20asc'
'&fq=-{exact_name}'
'{synonyms_clause}',
Expand Down Expand Up @@ -1087,5 +1089,4 @@ def keep_phonetic_match(cls, word, query):
@classmethod
def keep_candidate(cls, candidate, name, names):
if len([doc['id'] for doc in names if doc['id'] == candidate['id']]) == 0:
names.append({'name': name, 'id': candidate['id'], 'source': candidate['source']})

names.append({'name': name, 'id': candidate['id'], 'source': candidate['source'], 'jurisdiction': candidate['jurisdiction'],'start_date': candidate['start_date'] })
11 changes: 0 additions & 11 deletions api/requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ Flask-Marshmallow<3
flask-jwt-oidc>=0.1.5
python-dotenv==0.8.2
psycopg2-binary
gunicorn
Flask
Flask-Migrate
Flask-Script
Flask-Moment
Flask-SQLAlchemy
Flask-RESTplus
Flask-Marshmallow<3
flask-jwt-oidc>=0.1.5
python-dotenv==0.8.2
psycopg2-binary
marshmallow==2.19.2
marshmallow-sqlalchemy
cx_Oracle
Expand Down

0 comments on commit 7209e38

Please sign in to comment.