-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Combine search queries with union - updated tests
- Loading branch information
1 parent
cb1a749
commit 6f558f6
Showing
8 changed files
with
177 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,5 @@ app/media/ | |
/logging/ | ||
/pdf_uploads/ | ||
/pdf_upload_completed/ | ||
/tmp/ | ||
/tmp/app_punt_env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
app/general/migrations/0012_alter_documentfile_search_vector.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import django.contrib.postgres.search | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
('general', '0011_alter_documentfile_options_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveField( | ||
model_name='documentfile', | ||
name='search_vector', | ||
), # also deletes `search_vector_trigger` and general_doc_search__752b22_gin | ||
migrations.AddField( | ||
model_name='documentfile', | ||
name='search_vector', | ||
field=models.GeneratedField(db_persist=True, expression=django.contrib.postgres.search.CombinedSearchVector( | ||
django.contrib.postgres.search.CombinedSearchVector( | ||
django.contrib.postgres.search.SearchVector('title', config='english', weight='A'), '||', | ||
django.contrib.postgres.search.SearchVector('description', config='english', weight='B'), | ||
django.contrib.postgres.search.SearchConfig('english')), '||', | ||
django.contrib.postgres.search.SearchVector('document_data', config='english', weight='C'), | ||
django.contrib.postgres.search.SearchConfig('english')), null=True, | ||
output_field=django.contrib.postgres.search.SearchVectorField()), | ||
), | ||
migrations.AddIndex( | ||
model_name='documentfile', | ||
index=django.contrib.postgres.indexes.GinIndex(fields=['search_vector'], | ||
name='general_doc_search__752b22_gin'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters