mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Extend GIN to support partial-match searches, and extend tsquery to support
prefix matching using this facility. Teodor Sigaev and Oleg Bartunov
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.13 2008/03/10 12:57:05 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/utils/adt/tsvector.c,v 1.14 2008/05/16 16:31:01 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -85,14 +85,9 @@ compareentry(const void *va, const void *vb, void *arg)
|
||||
const WordEntryIN *b = (const WordEntryIN *) vb;
|
||||
char *BufferStr = (char *) arg;
|
||||
|
||||
if (a->entry.len == b->entry.len)
|
||||
{
|
||||
return strncmp(&BufferStr[a->entry.pos],
|
||||
&BufferStr[b->entry.pos],
|
||||
a->entry.len);
|
||||
}
|
||||
|
||||
return (a->entry.len > b->entry.len) ? 1 : -1;
|
||||
return tsCompareString( &BufferStr[a->entry.pos], a->entry.len,
|
||||
&BufferStr[b->entry.pos], b->entry.len,
|
||||
false );
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user