

First database(or files) is scanned so all words present in it are listed with their indication (link), where they can be found. In general, full-text search depends on two tasks: indexing and searching.

Of course there are some situations when multiple, non-full-text search is still useful, but in my project I would like to make use of this nice feature.įor Library Portal project I’ll use Hibernate Search, which extends Hibernate ORM (which is implementation of JPA) and integrates with Apache Lucene. Finally it can order results by relevance or even search for information in text filed (.docx/.pdf). Synonyms (“pretty”, “beautiful”) or word conjugations (“do”, “did”, “done”) are also considered as matching queries. Moreover, full-text search analyze our data so it can more preciously match to the query. if we want to find a book we can looked for its title, author or ISBN, so each of book property will have own search box. Another thing is that on the old-fashioned websites there are multiple search box, each related to a different field in the database, e.g. Also when we input our queries we sometimes made spelling errors that with ‘traditional’ approach would not give us results that we are looking for, because our app would search for exact match in the database. Ok, so why to use some fancy full-text search feature? Why I need this additional thing in my application, instead of using standard approach, which is SQL LIKE phrase?Īs a users we have get used to one search box on the website or application. Full-text search of books I’ll cover later one, in another post.

In this blog post I want to focus on implementing full-text search only for users, because it is more simple to do, so it gives me a quick start in Hibernate Search.
