We have updated Flexmonster Software License Agreement, effective as of September 30, 2025 (list of changes)

How to pass customized parameter in the Index Query

Answered
Loganathan A asked on September 12, 2025

Hello Solomiia,

 

We need assist to pass the customized parameter(Where conditions) in the Index Query to fetch the records.

Kindly check and advise.

Thanks,

Loganathan A.

 

Solomiia Andrusiv created this ticket from #75345

6 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 15, 2025

Hello, Loganathan!

Thank you for your question.

Kindly note that in Flexmonster Data Server, you only specify the query once when creating the index, in the Query property: https://www.flexmonster.com/doc/data-sources-for-console-app/#database. It is not possible to update the queries dynamically after the index is initialized.

Hope it helps.

Kind regards,
Solomiia

Public
Loganathan A September 17, 2025

Hello Solomiia,

When we are trying to install the FlexMonster Admin Panel, we got the following error. Need your assist to fix the error.

root@ip-10-91-7-94:~/flexmonster-data-server#./Flexmonster-Admin-Panel.AppImage

root@d7b3da7e8fdf:/opt/flexmonster# cat /opt/flexmonster/logs/admin-panel.log

[10:0916/191535.534017:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory

[10:0916/191536.591787:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY

[10:0916/191536.592810:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.

 

 Thanks,

 Loganathan A.

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 18, 2025

Hello, Loganathan!

Thank you for reaching out to us.

Kindly note that you don't need to install the Admin Panel separately. As we have discussed in the following thread, it is possible to configure the Data Server to start the Admin Panel automatically.

Let us share an example of how we are running the Data Server in Docker and refreshing the index on our side:

1) Get the Data Server. You are welcome to download the package for the necessary OS from the Clients Area: https://client.flexmonster.com/downloads

2) Open the downloadable package and extract the contents into the folder with your Dockerfile. You can update the data and flexmonster.config.json file with your own.

3) In your Dockerfile, we recommend adding the following commands to run the Data Server:
Note: the Data Server will run the Admin Panel automatically with --service we added to the ENTRYPOINT.

# Set working directory
WORKDIR /app

# Copy the Data Server executable only (config and data will be mounted in dockercompose.yml)
COPY flexmonster-data-server /app/flexmonster-data-server

# Ensure the executable has the correct permissions
RUN chmod +x /app/flexmonster-data-server

# Create directories for mounted volumes
RUN mkdir -p /app/sample-data
RUN mkdir -p /app/logs

# Expose both ports used by the Flexmonster Data Server
EXPOSE 9500 9555

# Run the flexmonster data server with configuration file
ENTRYPOINT ["./flexmonster-data-server", "--service", "--settings", "flexmonster-config.json", "--homedir", "/app"]

4) Add the following configurations to your docker-compose.yml:

services:
flexmonster-data-server:
build: .
container_name: flexmonster-server
ports:
- "9500:9500"
- "9555:9555"
volumes:
- ./flexmonster-config.json:/app/flexmonster-config.json:ro
- ./sample-data:/app/sample-data:ro

5) Run docker-compose up --build to build the image and run the container

6) Check if the Data Server is responding to GET http://localhost:9500/handshake

7) After the Data Server is up, you should be able to refresh the index with the command:

docker exec flexmonster-server curl -X PUT http://localhost:9555/admin/indexes/reload/YOUR_INDEX_NAME

Since the Admin Panel is only listening to the localhost, it will refresh the index only when PUT request is made inside the Docker container. You can use the command above or add a simple proxy server to trigger the refresh inside the container.

Hope you will find our answer helpful. Please let us know if our sample was helpful.

Kind regards,
Solomiia

Public
Loganathan A September 19, 2025

Hi Solomiia,

We are able to progress with your inputs; but have hit some issues.

We were able to perform the refresh from a localhost and container is listening the port 9555. But the gateway service is running in the cluster and it is trying to connect the flexmonster service through port 9555 and gateway service received connection refused error from flexmonster service.

Thanks,

Loganathan A.

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster September 22, 2025

Hello, Loganathan!

Thank you for your feedback.

We are happy to hear that the refresh from localhost works well.

Kindly note that for security reasons, the Admin Panel listens only to localhost (127.0.0.1), while Docker publishes ports on 0.0.0.0, so requests from outside the container are not accepted directly.
Our team recommends one of the following approaches to trigger the refresh from outside the Docker container:

  • Add a simple proxy server with the /refresh/index_name endpoint, that would receive requests from outside the Docker, and then call PUT http://localhost:9555/admin/indexes/reload/YOUR_INDEX_NAME from inside the Docker.
  • Create a script that runs the following command and trigger it whenever a refresh is needed:
    docker exec flexmonster-server curl -s -X PUT "http://localhost:9555/admin/indexes/reload/$IndexName"

Hope you will find our answer helpful.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster October 2, 2025

Hello, Loganathan!

Hope you are doing well.

Our team is wondering if you had some time to check the discussed approaches of triggering index refresh on your side. Could you please let us know if you have any further questions?

Looking forward to hearing from you.

Kind regards,
Solomiia

Please login or Register to Submit Answer