Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web: Filter Path error #54

Closed
dpieski opened this issue Jun 1, 2020 · 13 comments
Closed

Web: Filter Path error #54

dpieski opened this issue Jun 1, 2020 · 13 comments
Labels
bug Something isn't working web Web module

Comments

@dpieski
Copy link
Contributor

dpieski commented Jun 1, 2020

sist2 version: 2.3.2

Platform (Linux or Docker): Docker on Windows

When I enter values in the "Filter Path", I get an "Elasticsearch Connection Error"

docker logs shows:

[7FC2978D0540] [2020-06-01 14:12:13] [WARNING serve.c] ElasticSearch error during query (400)
[7FC2978D0540] [2020-06-01 14:12:13] [WARNING serve.c] {
        "error":        {
                "root_cause":   [{
                                "type": "x_content_parse_exception",
                                "reason":       "[1:388] [bool] failed to parse field [filter]"
                        }],
                "type": "x_content_parse_exception",
                "reason":       "[1:388] [bool] failed to parse field [filter]",
                "caused_by":    {
                        "type": "illegal_state_exception",
                        "reason":       "expected value but got [START_ARRAY]"
                }
        },
        "status":       400
}
@simon987
Copy link
Collaborator

simon987 commented Jun 1, 2020

Hi,
did you use the --force-reset option when indexing after upgrading from an earlier sist2 version? There were some changes in the elasticsearch mappings that require a reset.
(You don't need to re-scan, only re-index with the -f flag)

EDIT: Looking closer at the error I'm not 100% sure that outdated mappings are causing this...can you let me know what version of elasticsearch you are using?

@dpieski
Copy link
Contributor Author

dpieski commented Jun 1, 2020

Yes, I used --force-reset.

To index, I ran:
docker run --rm -it --name sindex-eagle-0529 --network host -v $PWD/out/:/out simon987/sist2:2.3.2 index --force-reset --es-url http://localhost:9201 /out/theeag2.idx

Then for Web, I ran:
docker run --name sweb-theeag -a STDOUT -p 8590:8590 -v $PWD/out/theeag2.idx:/idx -v theeagle:/files simon987/sist2:2.3.2 web --bind 0.0.0.0:8590 --es-url 192.168.100.12:9201 /idx

Elasticsearch is as follows:

{
  "name" : "0556390d8b7f",
  "cluster_name" : "docker-cluster",
  "cluster_uuid" : "jCTXmi_MT9a_wZBRa5GbrA",
  "version" : {
    "number" : "7.7.0",
    "build_flavor" : "default",
    "build_type" : "docker",
    "build_hash" : "81a1e9eda8e6183f5237786246f6dced26a10eaf",
    "build_date" : "2020-05-12T02:01:37.602180Z",
    "build_snapshot" : false,
    "lucene_version" : "8.5.1",
    "minimum_wire_compatibility_version" : "6.8.0",
    "minimum_index_compatibility_version" : "6.0.0-beta1"
  },
  "tagline" : "You Know, for Search"
}

@simon987 simon987 added bug Something isn't working web Web module labels Jun 1, 2020
@dpieski
Copy link
Contributor Author

dpieski commented Jun 1, 2020

Oh, I forgot to mention, otherwise, the Web portion is connected to my Elasticsearch instance and the Search portion does work.

image

@simon987
Copy link
Collaborator

simon987 commented Jun 1, 2020

Okay, and just to be sure, does the path selection button (the button directly attached to the "Filter path" bar) work (i.e. lets you filter by directory) ?

@dpieski
Copy link
Contributor Author

dpieski commented Jun 1, 2020

It correctly displays the directories. However, when I select a directory, it returns with that error.

Also, the directories shown are not ordered. Should they be ordered?

@simon987
Copy link
Collaborator

simon987 commented Jun 1, 2020

Gotcha

the directories shown are not ordered. Should they be ordered?

The directories should be in alphabetical order, maybe because lowercase letters are ordered first? (for example My folder > my folder ?)

I'll investigate both issues later today

@dpieski
Copy link
Contributor Author

dpieski commented Jun 1, 2020

My folders all start with numbers like "1234.123 docket title"
Previously, when I would begin typing in the Filter Path field, I could type "1234" and it would show the folders starting in that directory so it would show this below the Filter Path field as possible values:

1234 Client
1234 Client\1234.001 Docket1
1234 Client\1234.002 Docket2\

etc.

simon987 added a commit that referenced this issue Jun 1, 2020
@simon987
Copy link
Collaborator

simon987 commented Jun 1, 2020

It looks like I've been unknowingly using an invalid syntax and in ES 7.7.0 they made it so that it creates an error instead of ignoring it.

In version 2.3.3 (no need to re-index) everything should work normally. Please let me know if that's the case.

Thanks

@dpieski
Copy link
Contributor Author

dpieski commented Jun 2, 2020

I no longer get the error with 2.3.3 when typing in the Filter Path field, however, it seems it has to be an exact and full path?

I no longer have any auto-suggestions for the path. Is that still a feature?
Now it is not there.
vs.
Previously it was (1.2.9):
image

@simon987
Copy link
Collaborator

simon987 commented Jun 2, 2020

The path filtering process has changed a little bit so the autocomplete feature was removed in favor of the path selector. I can re-implement autocomplete if that's something you were using regularly

@dpieski
Copy link
Contributor Author

dpieski commented Jun 2, 2020

I would appreciate it if the autocomplete were re-implemented. We do use it regularly.

We have a few thousand clients. Without the autocomplete there, we would have to scroll a bit to try and find the right client when we search just a specific client's files.

simon987 added a commit that referenced this issue Jun 2, 2020
@simon987
Copy link
Collaborator

simon987 commented Jun 2, 2020

I re-enabled path autocomplete in v2.4.0 (unfortunately you will need to re-index with --force-reset, if you don't want to re-scan you can cheat and change the version in descriptor.json in your 2.3.x index)

@dpieski
Copy link
Contributor Author

dpieski commented Jun 3, 2020

Awesome! Thanks so much.
It seems to be working correctly. No errors typing in the path and it autocompletes!

@dpieski dpieski closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working web Web module
Projects
None yet
Development

No branches or pull requests

2 participants