summaryrefslogtreecommitdiff
path: root/django/contrib/postgres/search.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #34459 -- Fixed SearchVector() crash for parameters with % symbol.Mariusz Felisiak2023-04-061-4/+1
| | | | | | Thanks Patryk Zawadzki for the report. Regression in 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.
* Fixed #33308 -- Added support for psycopg version 3.Daniele Varrazzo2022-12-151-1/+13
| | | | | | | Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews. Co-authored-by: Florian Apolloner <florian@apolloner.eu> Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
* Refs #33308 -- Added DatabaseOperations.compose_sql() on PostgreSQL.Florian Apolloner2022-12-121-8/+1
|
* Fixed #33788 -- Added TrigramStrictWordSimilarity() and ↵Matt Brewer2022-06-171-0/+9
| | | | TrigramStrictWordDistance() on PostgreSQL.
* Fixed #33397 -- Corrected resolving output_field for ↵Luke Plant2022-03-311-1/+6
| | | | | | | | | | | | | | | | | | DateField/DateTimeField/TimeField/DurationFields. This includes refactoring of CombinedExpression._resolve_output_field() so it no longer uses the behavior inherited from Expression of guessing same output type if argument types match, and instead we explicitly define the output type of all supported operations. This also makes nonsensical operations involving dates (e.g. date + date) raise a FieldError, and adds support for automatically inferring output_field for cases such as: * date - date * date + duration * date - duration * time + duration * time - time
* Refs #33476 -- Reformatted code with Black.django-bot2022-02-071-83/+128
|
* Fixed #32492 -- Added TrigramWordSimilarity() and TrigramWordDistance() on ↵Nikita Marchant2021-09-171-0/+18
| | | | PostgreSQL.
* Fixed #28194 -- Added support for normalization and cover density to SearchRank.Hannes Ljungberg2020-03-231-1/+10
|
* Fixed #31340 -- Allowed query expressions in SearchQuery.value and __search ↵Baptiste Mispelon2020-03-161-2/+3
| | | | lookup.
* Refs #31340 -- Simplified SearchQuery by making it subclass Func.Baptiste Mispelon2020-03-131-23/+16
|
* Removed unnecessary SearchQuery._combine().Baptiste Mispelon2020-03-131-5/+0
| | | | Unnecessary since its introduction in 2d877da85526bad0dad7fd6b1d56b1f924c0116a.
* Fixed #31147 -- Added SearchHeadline to django.contrib.postgres.Hannes Ljungberg2020-03-031-0/+53
|
* Simplified handling of weights in SearchRank.Simon Charette2020-02-261-17/+6
|
* Formalized SearchVector and SearchRank signatures.Simon Charette2020-02-261-13/+8
|
* Refs #31211 -- Prevented SearchConfig nesting in SearchVector and ↵Simon Charette2020-02-261-2/+8
| | | | | | | SearchQuery init. Passing a SearchConfig instance directly to SearchVector and SearchQuery would result in nested SearchConfig instance.
* Refs #3254 -- Removed unnecessary truth check in SearchVectorExact.as_sql().Simon Charette2020-02-261-1/+1
| | | | Direct usage of the @@ operator is perfectly allowed.
* Fixed #28528 -- Allowed combining SearchVectors with different configs.adamb702020-02-061-1/+1
|
* Simplified imports from django.db and django.contrib.gis.db.Nick Pope2020-02-041-4/+3
|
* Fixed #31211 -- Added SearchConfig expression.Hannes Ljungberg2020-01-291-14/+33
| | | | Thanks Simon Charette for the review.
* Improved SearchVectorCombinable and SearchQueryCombinable error messages.Hannes Ljungberg2020-01-271-3/+6
|
* Fixed #31088 -- Added support for websearch searching in SearchQuery.James Turk2019-12-161-0/+1
|
* Fixed #30488 -- Removed redundant Coalesce call in SQL generated by ↵Thomasina Lee2019-05-201-14/+15
| | | | | | SearchVector. Regression in 405c8363362063542e9e79beac53c8437d389520.
* Fixed #30385 -- Restored SearchVector(config) immutability.Simon Charette2019-04-231-4/+12
| | | | | | | | | | | | | | Regression in 1a28dc3887e8d66d5e3ff08cf7fb0a6212b873e5. The usage of CONCAT to allow SearchVector to deal with non-text fields made the generated expression non-IMMUTABLE which prevents a functional index to be created for it. Using a combination of COALESCE and ::text makes sure the expression preserves its immutability. Refs #29582. Thanks Andrew Brown for the report, Nick Pope for the review.
* Fixed #29997 -- Allowed combining SearchQuerys with different configs.Jaap Roes2018-11-301-2/+0
| | | | Seems to be a needless restriction in 978a00e39fee25cfa99065285b0de88366710fad.
* Fixed #27899 -- Added support for phrase/raw searching in SearchQuery.Claude Paroz2018-09-171-3/+12
| | | Thanks Tim Graham, Nick Pope, and Claude Paroz for contribution and review.
* Fixed #29644 -- Made SearchQuery.__str__() reflect negation and grouping.Tom Forbes2018-08-151-0/+7
|
* Fixed #29582 -- Fixed a crash when using SearchVector with non text-fields.Simon Charette2018-07-211-6/+3
| | | | | The PostgreSQL concat() function handles nulls and non-text values better than the || operator.
* Fixed #28492 -- Defined default output_field of expressions at the class level.Simon Charette2017-09-111-1/+3
| | | | | | This wasn't possible when settings were accessed during Field initialization time as our test suite setup script was triggering imports of expressions before settings were configured.
* Removed unused _combine() node argument from various combinable classes.Mariusz Felisiak2017-08-021-4/+4
| | | | | Unused since f59fd15c4928caf3dfcbd50f6ab47be409a43b01 (Combinable) and since its introduction in 2d877da85526bad0dad7fd6b1d56b1f924c0116a (SearchVectorCombinable/SearchQueryCombinable/SearchQuery).
* Fixed #28394 -- Allowed setting BaseExpression.output_field (renamed from ↵Sergey Fedoseev2017-07-141-3/+3
| | | | _output_field).
* Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.Vytis Banaitis2017-02-011-10/+4
|
* Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand2017-01-251-12/+12
|
* Refs #23919 -- Stopped inheriting from object to define new style classes.Simon Charette2017-01-191-2/+2
|
* Fixed #27143 -- Allowed combining SearchQuery with more than one & or | ↵Nicola Jordan2016-09-071-19/+39
| | | | operators.
* Fixed #24938 -- Added PostgreSQL trigram support.Matthew Somerville2016-05-131-0/+16
|
* Refs #3254 -- Added full text search to contrib.postgres.Marc Tamlyn2016-04-221-0/+187
Adds a reasonably feature complete implementation of full text search using the built in PostgreSQL engine. It uses public APIs from Expression and Lookup. With thanks to Tim Graham, Simon Charettes, Josh Smeaton, Mikey Ariel and many others for their advice and review. Particular thanks also go to the supporters of the contrib.postgres kickstarter.