cat README.md
Updated : Jul 28, 2021
Table of Contents
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.
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/.
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.
-
chmod setup-1.sh
Modify the access permission of
setup-1.sh
file.chmod +x setup-1.sh
-
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 -
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
If you are unfamiliar with the Fusion Admin UI, see General UI Overview.
Create a new Fusion app by importing the app template.
-
Log in to your Fusion Admin UI
-
Click on Import app
-
Choose
object.json
for Data File -
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.
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.
-
Log in to your Fusion Admin UI
-
Enter your newly created Fusion App's workspace by clicking on it from the launcher
-
Click on the datasource, web
-
If your datasource ran successfully, your query workbench should simulate search results similar to this:
If you are unfamiliar with Signals, see Signals Overview.
Understanding of Signals is not required to get this demo set up, however.
-
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". -
Run generate-signals-threaded.py
$ python3 sample-code/generate-signals-threaded.py
-
Go to the Fusion Admin UI, click on the Collection Picker and select [FUSION-APP-NAME]_signals
-
From the left navigation, click on QUERYING > Query Workbench
Check that the signals have been successfully gathered
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.
- [FUSION-APP-NAME]_click_signals_aggregation
- [FUSION-APP-NAME]_user_query_history_agg
- [FUSION-APP-NAME]_user_item_prefs_agg
- [FUSION-APP-NAME]_bpr_item_recs
- [FUSION-APP-NAME]_content_recs
- [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.
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 |
---|