# Creating search operators for PostgreSQL Backend

**URL:** <https://forum.djangoproject.com/t/creating-search-operators-for-postgresql-backend/8976>\
**Category:** Using Django\
**Created:** [July 28, 2021, 12:51am UTC](https://forum.djangoproject.com/t/creating-search-operators-for-postgresql-backend/8976 "2021-07-28T00:51:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TrustArgon](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/trustargon/32/5297_2.png) [@TrustArgon](https://forum.djangoproject.com/u/TrustArgon)\
**Post date:** [July 28, 2021, 12:51am UTC](https://forum.djangoproject.com/t/creating-search-operators-for-postgresql-backend/8976/1 "2021-07-28T00:51:27Z")

</div>

I’ve built a PostgreSQL database containing Systems inventory data including location, owner, ip, host name, and port scan information. The data resides in three tables. I’ve built a simple interface with search fields for each of the columns in php. I’m trying to build a new and much improved front end in django that includes a single search bar that allows for search parameters similar to google dorks (i.e. IP: for search on the IP address field and -PORT: to exclude a specific port number). I’ve poured over django documentation time and time again and can’t seem to get anywhere with it.

I understand the question is a bit vague but if anyone can help point me in the right direction to get this working and transition from the PHP monstrosity I’ve created, I’d greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![megaleunam](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/megaleunam/32/5289_2.png) [@megaleunam](https://forum.djangoproject.com/u/megaleunam)\
**Post date:** [July 28, 2021, 3:27am UTC](https://forum.djangoproject.com/t/creating-search-operators-for-postgresql-backend/8976/2 "2021-07-28T03:27:09Z")

</div>

Hi, could you be more specific?  
it is possible to use filters on a model used in a view.

here you have an example:

> **[Django Search Tutorial](https://learndjango.com/tutorials/django-search-tutorial)**
>
> Add basic search functionality to any Django website
