Added Front End

seojoseph

Member
We've added a custom built front end with new components like marketplace, blog, glossary, etc, etc. This is all integrated with xenforo.

We have elastic search and the developer is wondering how elastic search is storing documents. The code isnt overriding the save functionality of xenforo.

Any input?
 
As long as the add-on uses a proper search handler, the content should still be searchable.
 
but this isn't an add-on. This is a lavaral front end custom CMS/Marketplace using xenforo's users, extended the likes, added dislikes, participation points, etc, etc done the proper way. Its really a beautiful masterpiece. Created a library in xenforo for the integration to laveral.

So how is elastic search is storing documents? Where in the search handler does it 'talk with' with elastic search to say, put here.
 
Yes - content is searchable. The forum stuff but we want to add new content for the users to search. If you want I can add you on the repository and show you the site? Do you have bitbucket?
 
So it seems that elastic search just replies with the type and id, then it uses mysql to fetch the actual data. how do you display different types of documents?
 
Hmm it seems it doesnt pull the source of the document, so no data is shown. only index,type,id and score. kinda useless. What are we missing? @Brogan , @Kier or @Mike do you mind jumping in on this?
 
We've added a custom built front end with new components like marketplace, blog, glossary, etc, etc. This is all integrated with xenforo.

We have elastic search and the developer is wondering how elastic search is storing documents. The code isnt overriding the save functionality of xenforo.

Any input?

You can see the ElasticSearch index using the following command:

Code:
curl -XGET 'http://localhost:9200/xenforo113/_mapping?pretty=true'

Replace xenforo113 with the name of your database name.

The result of this command is:

Code:
    {
      "xenforo113" : {
        "post" : {
          "_source" : {
            "enabled" : false
          },
          "properties" : {
            "date" : {
              "type" : "long",
              "store" : "yes"
            },
            "discussion_id" : {
              "type" : "long",
              "store" : "yes"
            },
            "message" : {
              "type" : "string"
            },
            "node" : {
              "type" : "long"
            },
            "thread" : {
              "type" : "long"
            },
            "title" : {
              "type" : "string"
            },
            "user" : {
              "type" : "long",
              "store" : "yes"
            }
          }
        },
        "profile_post" : {
          "_source" : {
            "enabled" : false
          },
          "properties" : {
            "date" : {
              "type" : "long",
              "store" : "yes"
            },
            "discussion_id" : {
              "type" : "long",
              "store" : "yes"
            },
            "message" : {
              "type" : "string"
            },
            "title" : {
              "type" : "string"
            },
            "user" : {
              "type" : "long",
              "store" : "yes"
            }
          }
        },
        "thread" : {
          "_source" : {
            "enabled" : false
          },
          "properties" : {
            "date" : {
              "type" : "long",
              "store" : "yes"
            },
            "discussion_id" : {
              "type" : "long",
              "store" : "yes"
            },
            "message" : {
              "type" : "string"
            },
            "node" : {
              "type" : "long"
            },
            "thread" : {
              "type" : "long"
            },
            "title" : {
              "type" : "string"
            },
            "user" : {
              "type" : "long",
              "store" : "yes"
            }
          }
        }
      }
    }

This will give you an idea the of the data that ElasticSearch is indexing.
 
Awesome @AndyB - that helps a lot. I have a question for you or anyone else.. how does Elastic Search know what to score something? For example we've extended the default like and added dislikes as well as we have new "hubs" - We also plan on adding more like disagree, informative, funny, old.. which is inspired by http://xenforo.com/community/resources/post-ratings-taking-likes-to-the-next-level.410/ - so if we want to score posts using new 'ratings' where is that handled.. xenforo methods/classes or in elastic search? How do you hook into that? Maybe the score basically relevance but we would like to see whats it doing there exactly.
 
As long as you add a proper search handler, and update the indexes properly, Elastic Search will return and index the data.
 
Top Bottom