Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence Server/Data Center から Lucene へのクエリー 及び クエリー実行時間 をデバッグログで確認する

Confluence Server/Data Center において、検索のミドルウェアに Lucene が採用されています。

検索文字列に応じて、どのようにLucene側へのリクエストされるクエリに関しては、 "com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction" を DEBUGログレベルで追加することで検索時の文字列がどのようにLucene側へリクエストされているか、またクエリーの実行時間を確認可能です。

Confluenceの検索機能の仕様について確認する場合などにご活用ください。

---
注: 本ドキュメントの内容は、Confluence 7.13.7 を利用して動作確認を行っております。バージョン次第では、挙動が異なる場合がございます。

また、検索アルゴリズムや検索インデックス、 Lucene の詳細仕様などについては、アトラシアンサポートの対象外となる場合がございますこと、ご了承ください。本記事は参考情報として提供されております。
---

 

デバッグログの有効化する方法

下記ドキュメントに沿って、 "com.atlassian.confluence.search.v2.lucene.SearcherWithTokenAction" を ログレベルを “DEBUG“ で設定追加してください。

既存のクラスまたはパッケージのログ レベルを変更する

 

実際に出力されるログ

ログファイル atlassian-confluence.log 内に下記のようなDEBUGログが出力され、クエリー 及び クエリーの実行時間を確認することができます。

  • “コンフルエンス“で検索した場合のDEBUGログ

2022-09-15 06:08:57,829 DEBUG [http-nio-8090-exec-7] [search.v2.lucene.SearcherWithTokenAction] internalPerform Query time = 2ms, Query = +((+ConstantScore(type:comment type:attachment) +ConstantScore(container.content.type:attachment container.content.type:page container.content.type:blogpost container.content.type:custom container.content.type:comment)) ConstantScore(type:custom type:space type:blogpost type:comment type:page type:personalspacedesc type:userinfo type:spacedesc type:attachment)) +(+(title:コンフルエンス^2.0 contentBody:コンフルエンス content-name-unstemmed:コンフルエンス) +(ConstantScore(+type:custom +(contentPluginKey:com.atlassian.confluence.extra.team-calendars:calendar-content-type contentPluginKey:com.atlassian.confluence.extra.team-calendars:space-calendars-view-content-type)) ConstantScore(type:userinfo type:blogpost type:page type:attachment type:spacedesc type:personalspacedesc)))

 

よくあるお問い合わせ

Confluenceの仕様として、検索時に “a“ “an“ “the“ “is“ “are“ “and“ “or“ などのストップワードは検索時に無視されるため、利用出来ません。

Confluence 検索構文

Confluence では、"and"、"the"、"or" などの頻繁に使用される単語は、二重引用符内に含まれていても無視されます (ストップ ワード)。

よくあるお問い合わせとして、ストップワードをラベル名に利用すると、特定のラベル名での絞り込み検索などを実行しても、場合によっては意図したコンテンツがヒットしない場合がございますので、ご注意ください。

上記の件と関連した機能リクエストとして、下記が報告されております。

CONFSERVER-78709 Don't ignore Stop words in Label search('labelText:"a"', 'labelText:"an"', 'labelText:"the"', etc.) 

 

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events