Skip to content

Create and manage Fusion 5 demo starter configuration and share with partners

Notifications You must be signed in to change notification settings

lucidworks/apac-partnerkit-demo-starter

Repository files navigation

cat README.md

Partner Demo Kit

Updated : Jul 28, 2021

Table of Contents


Introduction

This is a starter demo template for Lucidworks partners. It contains a pre-configured Fusion App and an end user search application built using Lucidworks' App Studio.

License

App Studio Enterprise comes with a 30-day trial license in app-studio.lic. Once this expires, contact your regional Lucidworks representative or contact Lucidworks via the website for a new license: https://lucidworks.com/company/contact/.

Get Started

1. Install Fusion

This starter demo template was created using Fusion 5.4. You could try to use this on later versions of Fusion 5, but there is no guarantee that it will work.

For instuctions on installing Fusion 5, see Fusion Cloud Native on Kubernetes.

2. Prepare Fusion App Template

  1. chmod setup-1.sh

    Modify the access permission of setup-1.sh file.

    chmod +x setup-1.sh
  2. Run the setup-1.sh script

    This setup-1.sh script will only change the parameters according to your environent provided below. (this will not actually start installing apps or any modules)

    To run the script, there are five mandatory values that you must have ready:

    • -h : the fusion hostname (e.g. localhost)
    • -p : the fusion port (e.g. 6764)
    • -s : the protocol of your Fusion server (http or https)
    • -a : the fusion app name (a new name for you to define )
    • -t : the title to use on the search and pages (a title for your search UI)

    Note: If the fusion app name contains any whitespaces, they will be replaced with underscores. Also, for the fusion app name, use a short name or acronym as it gets prefixed to many configuration names such as Query Profiles, Query Pipelines, Jobs, and others.

    # Sample Commands
    # Nike
    $ ./setup-1.sh -h 'my.fusionhost.com' -p 6764 -s 'http' -a 'Nike' -t 'Nike Online'
    
    # Digital Workplace
    $ ./setup-1.sh -h 'my.fusionhost.com' -p 6764 -s 'https' -a 'Workplace' -t 'Digital Workplace'
    
    # Hardware Supply Company
    $ ./setup-1.sh -h 'my.fusionhost.com' -p 6764 -s 'https' -a 'Hardware Supply' -t 'Hardware Supply'

    The setup script in the previous stage should have modified the contents of the objects.json file to change all occurences of the Fusion App name from partnerkit to what you had defined.

    For example, if you ran:

    $ ./setup-1.sh -h 'my.fusionhost.com' -p 6764 -s 'http' -a 'Workplace' -t 'Digital Workplace'

    Your objects.json file should have changed like so:

    Before After
    object.json before object.json after
  3. Run the setup-2.py python script

    Make sure you have Python 3 installed on your system before running this script.

    This python script reads the objects.json file and modifies the ID values for certain configurations.

    This is because certain configurations need to be unique throughout a single Fusion instance, and not just a single Fusion App.

    python3 setup-2.py

3. Import Fusion App Template

If you are unfamiliar with the Fusion Admin UI, see General UI Overview.

Create a new Fusion app by importing the app template.

  1. Log in to your Fusion Admin UI

  2. Click on Import app


  3. Choose object.json for Data File


  4. Click Import

    If your Fusion instances already has the blob stopwords/stopwords_en.txt you may receive the below conflict warning. Click on the 'Merge' button which will skip the conflicting file and proceed with import.

  5. Check that the app has been imported successfully

4. Crawl Web Data

This template includes the web crawling configuration from Lucidworks.com as the initial value.

If you are unfamiliar with Fusion Datasources and Jobs, see Datasources and Jobs.
Understanding of Fusion Datasources and Jobs is not required to get this demo set up, however.

  1. Log in to your Fusion Admin UI

  2. Enter your newly created Fusion App's workspace by clicking on it from the launcher

  3. From the left navigation, click on INDEXING > Datasources

  4. Click on the datasource, web

  5. Click on Run > Start

  6. Go to Job History to view the job log

  7. Once the job ends, the status will change

  8. Navigate to QUERYING > Query Workbench

  9. If your datasource ran successfully, your query workbench should simulate search results similar to this:

5. Generate Signals

If you are unfamiliar with Signals, see Signals Overview.
Understanding of Signals is not required to get this demo set up, however.

  1. Open the generate-signals-threaded.py file, located in the sample-code folder, in a text editor and change the following values:

    Variable Description
    fusion_ip Fusion host
    fusion_port Fusion port
    fusion_user Fusion username
    fusion_password Fusion password
    fusion_app Fusion App name
    fusion_query_profile Query Profile that will process the main user query
    fusion_collection Collection that contains your searchable data
    documentLabel Name of the field containing the document label, usually file name or product name (Do not change this value if you're using the index pipeline provided in the template)

    For example, if you named your Fusion App "Workplace" in step 2. Prepare Fusion App Template, the values for fusion_app, fusion_query_profile, fusion_collection will be "Workplace".

  2. Run generate-signals-threaded.py

    $ python3 sample-code/generate-signals-threaded.py
  3. Go to the Fusion Admin UI, click on the Collection Picker and select [FUSION-APP-NAME]_signals

  4. From the left navigation, click on QUERYING > Query Workbench
    Check that the signals have been successfully gathered

6. Generate Recommendations

If you are unfamiliar with Recommendations, see Recommendations and Boosting Overview.
Understanding of Recommendations is not required to get this demo set up, however.

Using the signals that we generated earlier, we'll create some data aggregations and recommendations to enhance search relevance and experience. Navigate to COLLECTIONS > Jobs run the jobs below in the given order.

Note: Only proceed with the next job after the current one has completed successfully.

  1. [FUSION-APP-NAME]_click_signals_aggregation
  2. [FUSION-APP-NAME]_user_query_history_agg
  3. [FUSION-APP-NAME]_user_item_prefs_agg
  4. [FUSION-APP-NAME]_bpr_item_recs
  5. [FUSION-APP-NAME]_content_recs
  6. [FUSION-APP-NAME]_query_recs

Once you've run all the jobs, go to COLLECTIONS > Collection Manager and see that other collections now have documents.

Example:

7. Start App Studio

If you are unfamiliar with App Studio, see Fusion App Studio.
Understanding of App Studio is not required to get this demo set up, however.

This starter template is a modified version of the App Studio Enterprise (ASE) 4.11.0 which uses Appkit version 4.11.0. The original ASE packages are available for download here. Note that you can upgrade the Appkit version of your App Studio project using the instructions here.

Note: Fusion 4.x, 5.0.x, and 5.1.x are compatible with Appkit versions 4.10.0 and earlier.

Use the start method below during development and for production, package your search application in a Java WAR file or Java JAR file. For more information, see Deployment Overview.

Note: npm is required to run App Studio

To install npm:

$ curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
$ sudo yum install nodejs

To start App Studio go in to the folder app-studio and start:

$ cd app-studio/
$ ./app-studio start -t 300

Note that the -t flag is optional and is used to set the start timeout in seconds. Default timeout is 240 seconds which may not be enough when starting App Studio for the first time as various modules need to get downloaded initially.

Example screenshots of App Studio search UI

Summary Page
Main Search Page Search Detail Page
Typeahead

About

Create and manage Fusion 5 demo starter configuration and share with partners

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published