Index is not getting created for large set data around 100000












0















I am trying to implement hibernate search using lucene but indexing is not happening properly because of that i am getting empty search result. Below are the configuration.

Pom.xml

<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.3.7.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>5.10.4.Final</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc8</artifactId>
<version>12.2.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${springframework.version}</version>
</dependency>

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${springframework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${springframework.version}</version>
<exclusions>
<exclusion>
<artifactId>jboss-logging</artifactId>
<groupId>org.jboss.logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
<version>0.23.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>2.0.0.RELEASE</version>
<exclusions>
<exclusion>
<artifactId>org.hibernate</artifactId>
<groupId>hibernate-core</groupId>
</exclusion>
</exclusions>
</dependency>

Below is the Entity class configuration for indexing-

@Indexed
public class Person
{
@Column(name = "V_FIRST_NAME")
@SortableField
@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
private String firstName;

@Column(name = "V_MIDDLE_NAME")
@SortableField
@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
private String middleName;

@Column(name = "V_LAST_NAME")
@SortableField
@Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
private String lastName;
//setter/getter
}

**Hibernate Configuration Class**


properties.setProperty("hibernate.search.default.directory_provider", "filesystem"); properties.setProperty("hibernate.search.default.indexBase","D:/SoftwaresConfigured/Lucene_Index/indexes"); properties.setProperty("hibernate.search.default.indexwriter.infostream", "true");
properties.setProperty("hibernate.search.default.exclusive_index_use","true");
properties.setProperty("hibernate.search.default.indexwriter.max_merge_docs","100");
properties.setProperty("hibernate.search.default.indexwriter.ram_buffer_size","64");



**Creating index using below code using FullTextEntityManager **

fullTextEntityManager.createIndexer().batchSizeToLoadObjects(30).cacheMode(CacheMode.NORMAL).threadsToLoadObjects(10).startAndWait();



    Indexing file are getting created for small set of data but for large set of data it is not getting created. Please help.









share|improve this question





























    0















    I am trying to implement hibernate search using lucene but indexing is not happening properly because of that i am getting empty search result. Below are the configuration.

    Pom.xml

    <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-core</artifactId>
    <version>5.3.7.Final</version>
    </dependency>
    <dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-search-orm</artifactId>
    <version>5.10.4.Final</version>
    </dependency>
    <dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>12.2.0.1</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>${springframework.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aop</artifactId>
    <version>${springframework.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-beans</artifactId>
    <version>${springframework.version}</version>
    </dependency>

    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-expression</artifactId>
    <version>${springframework.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>${springframework.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>${springframework.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>${springframework.version}</version>
    </dependency>
    <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-orm</artifactId>
    <version>${springframework.version}</version>
    <exclusions>
    <exclusion>
    <artifactId>jboss-logging</artifactId>
    <groupId>org.jboss.logging</groupId>
    </exclusion>
    </exclusions>
    </dependency>
    <dependency>
    <groupId>org.springframework.hateoas</groupId>
    <artifactId>spring-hateoas</artifactId>
    <version>0.23.0.RELEASE</version>
    </dependency>
    <dependency>
    <groupId>org.springframework.data</groupId>
    <artifactId>spring-data-jpa</artifactId>
    <version>2.0.0.RELEASE</version>
    <exclusions>
    <exclusion>
    <artifactId>org.hibernate</artifactId>
    <groupId>hibernate-core</groupId>
    </exclusion>
    </exclusions>
    </dependency>

    Below is the Entity class configuration for indexing-

    @Indexed
    public class Person
    {
    @Column(name = "V_FIRST_NAME")
    @SortableField
    @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
    private String firstName;

    @Column(name = "V_MIDDLE_NAME")
    @SortableField
    @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
    private String middleName;

    @Column(name = "V_LAST_NAME")
    @SortableField
    @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
    private String lastName;
    //setter/getter
    }

    **Hibernate Configuration Class**


    properties.setProperty("hibernate.search.default.directory_provider", "filesystem"); properties.setProperty("hibernate.search.default.indexBase","D:/SoftwaresConfigured/Lucene_Index/indexes"); properties.setProperty("hibernate.search.default.indexwriter.infostream", "true");
    properties.setProperty("hibernate.search.default.exclusive_index_use","true");
    properties.setProperty("hibernate.search.default.indexwriter.max_merge_docs","100");
    properties.setProperty("hibernate.search.default.indexwriter.ram_buffer_size","64");



    **Creating index using below code using FullTextEntityManager **

    fullTextEntityManager.createIndexer().batchSizeToLoadObjects(30).cacheMode(CacheMode.NORMAL).threadsToLoadObjects(10).startAndWait();



        Indexing file are getting created for small set of data but for large set of data it is not getting created. Please help.









    share|improve this question



























      0












      0








      0








      I am trying to implement hibernate search using lucene but indexing is not happening properly because of that i am getting empty search result. Below are the configuration.

      Pom.xml

      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>5.3.7.Final</version>
      </dependency>
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-search-orm</artifactId>
      <version>5.10.4.Final</version>
      </dependency>
      <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc8</artifactId>
      <version>12.2.0.1</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${springframework.version}</version>
      </dependency>

      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-expression</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-orm</artifactId>
      <version>${springframework.version}</version>
      <exclusions>
      <exclusion>
      <artifactId>jboss-logging</artifactId>
      <groupId>org.jboss.logging</groupId>
      </exclusion>
      </exclusions>
      </dependency>
      <dependency>
      <groupId>org.springframework.hateoas</groupId>
      <artifactId>spring-hateoas</artifactId>
      <version>0.23.0.RELEASE</version>
      </dependency>
      <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-jpa</artifactId>
      <version>2.0.0.RELEASE</version>
      <exclusions>
      <exclusion>
      <artifactId>org.hibernate</artifactId>
      <groupId>hibernate-core</groupId>
      </exclusion>
      </exclusions>
      </dependency>

      Below is the Entity class configuration for indexing-

      @Indexed
      public class Person
      {
      @Column(name = "V_FIRST_NAME")
      @SortableField
      @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
      private String firstName;

      @Column(name = "V_MIDDLE_NAME")
      @SortableField
      @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
      private String middleName;

      @Column(name = "V_LAST_NAME")
      @SortableField
      @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
      private String lastName;
      //setter/getter
      }

      **Hibernate Configuration Class**


      properties.setProperty("hibernate.search.default.directory_provider", "filesystem"); properties.setProperty("hibernate.search.default.indexBase","D:/SoftwaresConfigured/Lucene_Index/indexes"); properties.setProperty("hibernate.search.default.indexwriter.infostream", "true");
      properties.setProperty("hibernate.search.default.exclusive_index_use","true");
      properties.setProperty("hibernate.search.default.indexwriter.max_merge_docs","100");
      properties.setProperty("hibernate.search.default.indexwriter.ram_buffer_size","64");



      **Creating index using below code using FullTextEntityManager **

      fullTextEntityManager.createIndexer().batchSizeToLoadObjects(30).cacheMode(CacheMode.NORMAL).threadsToLoadObjects(10).startAndWait();



          Indexing file are getting created for small set of data but for large set of data it is not getting created. Please help.









      share|improve this question
















      I am trying to implement hibernate search using lucene but indexing is not happening properly because of that i am getting empty search result. Below are the configuration.

      Pom.xml

      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-core</artifactId>
      <version>5.3.7.Final</version>
      </dependency>
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-search-orm</artifactId>
      <version>5.10.4.Final</version>
      </dependency>
      <dependency>
      <groupId>com.oracle</groupId>
      <artifactId>ojdbc8</artifactId>
      <version>12.2.0.1</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${springframework.version}</version>
      </dependency>

      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-expression</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>${springframework.version}</version>
      </dependency>
      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-orm</artifactId>
      <version>${springframework.version}</version>
      <exclusions>
      <exclusion>
      <artifactId>jboss-logging</artifactId>
      <groupId>org.jboss.logging</groupId>
      </exclusion>
      </exclusions>
      </dependency>
      <dependency>
      <groupId>org.springframework.hateoas</groupId>
      <artifactId>spring-hateoas</artifactId>
      <version>0.23.0.RELEASE</version>
      </dependency>
      <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-jpa</artifactId>
      <version>2.0.0.RELEASE</version>
      <exclusions>
      <exclusion>
      <artifactId>org.hibernate</artifactId>
      <groupId>hibernate-core</groupId>
      </exclusion>
      </exclusions>
      </dependency>

      Below is the Entity class configuration for indexing-

      @Indexed
      public class Person
      {
      @Column(name = "V_FIRST_NAME")
      @SortableField
      @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
      private String firstName;

      @Column(name = "V_MIDDLE_NAME")
      @SortableField
      @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
      private String middleName;

      @Column(name = "V_LAST_NAME")
      @SortableField
      @Field(index = Index.YES, analyze = Analyze.YES, store = Store.NO)
      private String lastName;
      //setter/getter
      }

      **Hibernate Configuration Class**


      properties.setProperty("hibernate.search.default.directory_provider", "filesystem"); properties.setProperty("hibernate.search.default.indexBase","D:/SoftwaresConfigured/Lucene_Index/indexes"); properties.setProperty("hibernate.search.default.indexwriter.infostream", "true");
      properties.setProperty("hibernate.search.default.exclusive_index_use","true");
      properties.setProperty("hibernate.search.default.indexwriter.max_merge_docs","100");
      properties.setProperty("hibernate.search.default.indexwriter.ram_buffer_size","64");



      **Creating index using below code using FullTextEntityManager **

      fullTextEntityManager.createIndexer().batchSizeToLoadObjects(30).cacheMode(CacheMode.NORMAL).threadsToLoadObjects(10).startAndWait();



          Indexing file are getting created for small set of data but for large set of data it is not getting created. Please help.






      hibernate search






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 25 '18 at 14:59







      user3582164

















      asked Nov 23 '18 at 11:46









      user3582164user3582164

      113




      113
























          0






          active

          oldest

          votes












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446125%2findex-is-not-getting-created-for-large-set-data-around-100000%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53446125%2findex-is-not-getting-created-for-large-set-data-around-100000%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Xamarin.form Move up view when keyboard appear

          Post-Redirect-Get with Spring WebFlux and Thymeleaf

          Anylogic : not able to use stopDelay()