Implement PostgreSQL full text search

Поиск
Список
Период
Сортировка
От -
Тема Implement PostgreSQL full text search
Дата
Msg-id AANLkTindQHpXNUp1558PDuD42g_JHY0QRTz5vDp2AztJ@mail.gmail.com
обсуждение исходный текст
Список pgsql-sql
Hello everyone.<br />I'm trying to create search with pagination and filters on a website. I stumbled with the search
forthe words. It could do with ILIKE but the table will have many records, was looking at PostgreSQL full text search,
butdo not quite understand how to implement. Someone could help me with implementation?<br /><br />my select is<br
/><br/>SELECT entries. "id" entries. "title" entries. "description" entries. "price"<br />FROM<br />   (SELECT
ROW_NUMBER() OVER (<br />ORDER BY items. "date" DESC<br />    ) as Row,<br />   items. "id" items. "title" items.
"description"items. "price "<br />   FROM items, provinces<br />   WHERE<br />   items. "prov_id" = provinces.
"prov_id"<br/> AND items. "prov_id"= 2<br /><br />- I try to change here for PostgreSQL full text search<br />AND
(items."description" ILIKE ('% TEST search Postgre%') OR<br />items. "title" ILIKE ('% search Postgre% TEST'))<br />   
)as entries<br /><br />I want to look for words entered in the title and description columns of the table.<br />Thank
youvery much for any help.<br /><br /><br /><br />En Español<br /><br />Hola a todos.<br />Estoy intentando crear
busquedacon paginacion y filtros en una pagina web. Me tropeze con la busqueda por las palabras. Se podria hacer con
ILIKEpero la tabla va a tener muchos registros, estaba mirando a postgreSQL full text search, pero no entiendo bien
comoimplementar. Me podria ayudar alquien con implementacion?<br /><br />mi select es<br /><br />SELECT entries."id",
entries."title",entries."description", entries."price"<br />FROM <br />  (SELECT ROW_NUMBER() OVER (<br />             
ORDERBY items."date" DESC<br />   ) as Row,<br />      items."id", items."title", items."description", items."price"<br
/> FROM items, provinces <br />  WHERE <br />  items."prov_id"=provinces."prov_id" <br />             AND
items."prov_id"=2<br/><br />    -- I try to change here for postgreSQL full text search<br />            AND
(items."description"ILIKE('%TEST search postgre%') OR <br />                items."title" ILIKE('%TEST search
postgre%'))<br/>       ) as entries <br /><br />Quiero que busque palabras introducidas en las columnas title y
descriptionde la tabla. <br />Muchas gracias por cualquier ayuda.<br /> 

В списке pgsql-sql по дате отправления:

Предыдущее
От: "Amar Dhole"
Дата:
Сообщение: Re: help needs in converting db2 function in postgresql.
Следующее
От: Protasov Vladimir
Дата:
Сообщение: INSERT/UPDATE .. RETURNING