Category: MySQL
-
Search Lucene Index created in database using JdbcDirectory
In our last excercise we created Lucene index in database using JdbcDirectory which comes with Compass in this post we will search against index created. With this much of text let’s get our hand dirty and write some code. Please note following files will be used from create lucene index post pom.xml MyJDBCDirectory.java JDBCBatchInsert.java JDBCIndexer.java…
-
Full Text Search with Hibernate Search 4.1, Lucene and JPA
Earlier we worked directly with Lucene API to create and search index Index and Search a Directory using Apache Lucene Create Lucene Index in database using JdbcDirectory”> Instead we can use HibernateSearch which internally uses Lucene functionality to index and search content. With that let’s get some code behind us. We will extend our code from JPA…
-
JPA OneToMany Unidirectional without Join Table
In earlier post we had OneToMany uni-directional mapping with the help of JoinTable. In this post we will see how can we make it unidirectional without using JoinTable. Let’s create our eclipse project and then add update our pom.xml. pom.xml [sourcecode language=”xml”] <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion>4.0.0</modelVersion> <groupId>com.mumz.test.hibernatesearch</groupId> <artifactId>MumzHibernateSearch</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>MumzHibernateSearch</name> <url>http://maven.apache.org</url>…
-
JPA OneToMany Unidirectional with Join Table
In earlier post we had OneToMany bi-directional mapping. In this post we will see how can we make it unidirectional with the usage of a JoinTable. Let’s create our eclipse project and then add update our pom.xml. pom.xml [sourcecode language=”xml”] <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion>4.0.0</modelVersion> <groupId>com.mumz.test.hibernatesearch</groupId> <artifactId>MumzHibernateSearch</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name>MumzHibernateSearch</name> <url>http://maven.apache.org</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>…