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

[Question]: BadRequestError #542

Open
lingzhi42166 opened this issue Apr 25, 2024 · 6 comments
Open

[Question]: BadRequestError #542

lingzhi42166 opened this issue Apr 25, 2024 · 6 comments
Labels
question Further information is requested

Comments

@lingzhi42166
Copy link

lingzhi42166 commented Apr 25, 2024

When opening the page to view and analyze the data set (that is, when requesting the url http://localhost/v1/chunk/list), the following error is returned:

{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
            }
        ],
        "type": "search_phase_execution_exception",
        "reason": "all shards failed",
        "phase": "query",
        "grouped": true,
        "failed_shards": [
            {
                "shard": 0,
                "index": "ragflow_50a01de202ee11ef915d0242ac120002",
                "node": "OAM8RRqrRjWF3-4v3XuIRQ",
                "reason": {
                    "type": "illegal_argument_exception",
                    "reason": "Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
                }
            }
        ],
        "caused_by": {
            "type": "illegal_argument_exception",
            "reason": "Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory.",
            "caused_by": {
                "type": "illegal_argument_exception",
                "reason": "Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory."
            }
        }
    },
    "status": 400
}

Raw error log as follows:

BadRequestError('search_phase_execution_exception', meta=ApiResponseMeta(status=400, http_version='1.1', headers={'X-elastic-product': 'Elasticsearch', 'content-type': 'application/vnd.elasticsearch+json;compatible-with=8', 'content-length': '2231'}, duration=0.007349252700805664, node=NodeConfig(scheme='http', host='es01', port=9200, path_prefix='', headers={'user-agent': 'elasticsearch-py/8.12.1 (Python/3.11.0; elastic-transport/8.12.0)'}, connections_per_node=10, request_timeout=10.0, http_compress=False, verify_certs=True, ca_certs=None, client_cert=None, client_key=None, ssl_assert_hostname=None, ssl_assert_fingerprint=None, ssl_version=None, ssl_context=None, ssl_show_warn=True, _extras={})), body={'error': {'root_cause': [{'type': 'illegal_argument_exception', 'reason': 'Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory.'}], 'type': 'search_phase_execution_exception', 'reason': 'all shards failed', 'phase': 'query', 'grouped': True, 'failed_shards': [{'shard': 0, 'index': 'ragflow_50a01de202ee11ef915d0242ac120002', 'node': 'OAM8RRqrRjWF3-4v3XuIRQ', 'reason': {'type': 'illegal_argument_exception', 'reason': 'Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory.'}}], 'caused_by': {'type': 'illegal_argument_exception', 'reason': 'Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory.', 'caused_by': {'type': 'illegal_argument_exception', 'reason': 'Fielddata is disabled on [create_time] in [ragflow_50a01de202ee11ef915d0242ac120002]. Text fields are not optimised for operations that require per-document field data like aggregations and sorting, so these operations are disabled by default. Please use a keyword field instead. Alternatively, set fielddata=true on [create_time] in order to load field data by uninverting the inverted index. Note that this can use significant memory.'}}}, 'status': 400})
@lingzhi42166 lingzhi42166 added the question Further information is requested label Apr 25, 2024
@KevinHuSh
Copy link
Collaborator

Could you share a sample of your file?

@lingzhi42166
Copy link
Author

Could you share a sample of your file?
我上传的是word文件,内容如下(我在https://demo.ragflow.io/上传同样的文件是可以正常解析并返回的):
23.3 切割作业
23.3.1 点火时应先开乙炔阀、后开氧气阀,嘴孔不得对人;熄火时顺
序相反。发生回火或爆鸣时,应先关乙炔阀,再关氧气阀。
23.3.2 使用中的氧气瓶和乙炔气瓶应垂直固定放置,氧气瓶和乙炔气
23.3.3 气瓶不得靠近热源或在烈日下曝晒。乙炔气瓶使用时必须直立
放置,禁止卧放使用。

@lingzhi42166
Copy link
Author

lingzhi42166 commented Apr 25, 2024

Thanks for your response,I have try to create an empty file in knowledgebase,but also return same BadRequestError when I open the file

@JinHai-CN
Copy link
Contributor

JinHai-CN commented Apr 25, 2024

@lingzhi42166
We intend to create an international community, so we encourage using English for questions and answers to help others with similar queries. 😊

For your question, would please attach the sample file in the issue?

And the error log isn't formatted, which is hard to recognize. May be you can find a tool to format it.

@lingzhi42166
Copy link
Author

@lingzhi42166 We intend to create an international community, so we encourage using English for questions and answers to help others with similar queries. 😊

For your question, would please attach the sample file in the issue?

And the error log isn't formatted, which is hard to recognize. May be you can find a tool to format it.

Thanks for your suggestion,I have formatted my error log and attach sample file.
test.docx

@KevinHuSh
Copy link
Collaborator

I didn't reproduce the case using this file. What about new another knowledge base and upload file?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants