Skip to content

Commit 9b0b396

Browse files
authored
Merge pull request #369 from swirlai/patch-2.0.2
Patch 2.0.2
2 parents ede62b1 + 9ec5e8d commit 9b0b396

File tree

3 files changed

+37
-35
lines changed

3 files changed

+37
-35
lines changed

README.md

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ Using the updated Spyglass UI, knowledge workers can systematically review the b
1717

1818
Built on the Python/Django stack, Swirl is intended for use by search managers, developers, data scientists and engineers who want to solve multi-silo search problems - including notification services - without moving, re-indexing or re-permissioning sensitive information.
1919

20-
Learn more: [Documentation Wiki](https://github.com/swirlai/swirl-search/wiki)
20+
### Learn more: [Documentation Wiki](https://github.com/swirlai/swirl-search/wiki)
2121

2222
<br/>
2323

24-
# Try SWIRL Now
24+
# Try Swirl Now
2525

2626
* Download [https://raw.githubusercontent.com/swirlai/swirl-search/main/docker-compose.yaml](https://raw.githubusercontent.com/swirlai/swirl-search/main/docker-compose.yaml)
2727

@@ -32,14 +32,14 @@ curl https://raw.githubusercontent.com/swirlai/swirl-search/main/docker-compose.
3232
* From the console:
3333

3434
```
35-
docker compose up
35+
docker-compose pull && docker-compose up
3636
```
3737

3838
After a few minutes the following or similar should appear:
3939

4040
```
4141
ssdtest-app-1 | Command successful!
42-
ssdtest-app-1 | __S_W_I_R_L__2_._0______________________________________________________________
42+
ssdtest-app-1 | __S_W_I_R_L__2_._0_._2________________________________________________________
4343
ssdtest-app-1 |
4444
ssdtest-app-1 | Warning: logs directory does not exist, creating it
4545
ssdtest-app-1 | Start: rabbitmq -> rabbitmq-server ... Ok, pid: 53
@@ -53,17 +53,13 @@ ssdtest-app-1 | 577 ? 00:00:11 celery
5353
ssdtest-app-1 | 609 ? 00:00:06 celery
5454
ssdtest-app-1 |
5555
ssdtest-app-1 | Command successful!
56-
ssdtest-app-1 | 2023-01-21 13:16:11,070 INFO Starting server at tcp:port=8000:interface=0.0.0.0
57-
ssdtest-app-1 | 2023-01-21 13:16:11,074 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)
58-
ssdtest-app-1 | 2023-01-21 13:16:11,075 INFO Configuring endpoint tcp:port=8000:interface=0.0.0.0
59-
ssdtest-app-1 | 2023-01-21 13:16:11,079 INFO Listening on TCP address 0.0.0.0:8000
56+
ssdtest-app-1 | 2023-05-23 13:16:11,070 INFO Starting server at tcp:port=8000:interface=0.0.0.0
57+
ssdtest-app-1 | 2023-05-23 13:16:11,074 INFO HTTP/2 support not enabled (install the http2 and tls Twisted extras)
58+
ssdtest-app-1 | 2023-05-23 13:16:11,075 INFO Configuring endpoint tcp:port=8000:interface=0.0.0.0
59+
ssdtest-app-1 | 2023-05-23 13:16:11,079 INFO Listening on TCP address 0.0.0.0:8000
6060
```
6161

62-
* Open the following URL with a browser:
63-
64-
```
65-
http://localhost:8000/spyglass/
66-
```
62+
* Open this URL with a browser: http://localhost:8000/spyglass/
6763

6864
The search page will appear. Click `Log Out` at top, right. The Swirl login page will appear:
6965

@@ -75,15 +71,15 @@ Enter username `admin` and password `password`. Then click Login.
7571

7672
![Swirl Metasearch 2.0 Results](https://raw.githubusercontent.com/wiki/swirlai/swirl-search/images/swirl_metasearch_results.png)
7773

78-
:warning: The Docker version of SWIRL does *not* retain results or configuration when shut down!
74+
:warning: The Docker version of Swirl does *not* retain results or configuration when shut down!
7975

80-
:key: Swirl includes three (3) Google Programmable Search Engines (PSEs), complete with shared credentials, to get you up and running with right away. These credentials are shared with the SWIRL Community.
76+
:key: Swirl includes three (3) Google Programmable Search Engines (PSEs), complete with shared credentials, to get you up and running with right away. These credentials are shared with the Swirl Community.
8177

82-
:key: Using Swirl with Microsoft 365 requires installation and approval by an authorized company administrator. For more information please review the [M365 Guide](https://github.com/swirlai/swirl-search/wiki/5.-M365-Guide) or [contact us](mailto:[email protected]) for more information.
78+
:key: Using Swirl with Microsoft 365 requires installation and approval by an authorized company administrator. For more information please review the [M365 Guide](https://github.com/swirlai/swirl-search/wiki/4.-M365-Guide) or [contact us](mailto:[email protected]) for more information.
8379

8480
<br/>
8581

86-
Learn more: [Quick Start](https://github.com/swirlai/swirl-search/wiki/1.-Quick-Start)
82+
### Learn more: [Quick Start](https://github.com/swirlai/swirl-search/wiki/1.-Quick-Start)
8783

8884
<br/>
8985

@@ -93,7 +89,7 @@ Learn more: [Quick Start](https://github.com/swirlai/swirl-search/wiki/1.-Quick-
9389

9490
<br/>
9591

96-
# Download SWIRL
92+
# Download Swirl
9793

9894
| Version | Date | Notes |
9995
| --------------------------- | --------------------------- | ----- |
@@ -103,53 +99,53 @@ Learn more: [Quick Start](https://github.com/swirlai/swirl-search/wiki/1.-Quick-
10399

104100
# Documentation Wiki
105101

106-
### [Home](https://github.com/swirlai/swirl-search/wiki) | [Quick Start](https://github.com/swirlai/swirl-search/wiki/1.-Quick-Start) | [User Guide](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide) | [Developer Guide](https://github.com/swirlai/swirl-search/wiki/3.-Developer-Guide) | [Admin Guide](https://github.com/swirlai/swirl-search/wiki/4.-Admin-Guide) | [M365 Guide](https://github.com/swirlai/swirl-search/wiki/5.-M365-Guide)
102+
### [Home](https://github.com/swirlai/swirl-search/wiki) | [Quick Start](https://github.com/swirlai/swirl-search/wiki/1.-Quick-Start) | [User Guide](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide) | [Admin Guide](https://github.com/swirlai/swirl-search/wiki/3.-Admin-Guide) | [M365 Guide](https://github.com/swirlai/swirl-search/wiki/4.-M365-Guide) | [Developer Guide](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide) | [Developer Reference](https://github.com/swirlai/swirl-search/wiki/6.-Developer-Reference)
107103

108104
<br/>
109105

110106
# Key Features
111107

112-
* [Microsoft 365 integration and OAUTH2 support](https://github.com/swirlai/swirl-search/wiki/5.-M365-Guide)
108+
* [Microsoft 365 integration and OAUTH2 support](https://github.com/swirlai/swirl-search/wiki/4.-M365-Guide)
113109

114110
* [SearchProvider configurations](https://github.com/swirlai/swirl-search/tree/main/SearchProviders) for all included Connectors. They can be [organized with the active, default and tags properties](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#organizing-searchproviders-with-active-default-and-tags).
115111

116112
* [Adaptation of the query for each provider](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#search-syntax) such as rewriting `NOT term` to `-term`, removing NOTted terms from providers that don't support NOT, and passing down the AND, + and OR operators.
117113

118-
* [Synchronous or asynchronous search federation](https://github.com/swirlai/swirl-search/wiki/3.-Developer-Guide#architecture) via [APIs](http://localhost:8000/swirl/swagger-ui/)
114+
* [Synchronous or asynchronous search federation](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide#architecture) via [APIs](http://localhost:8000/swirl/swagger-ui/)
119115

120-
* [Optional subscribe feature](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#subscribing-to-a-search) to continuously monitor any search for new results
116+
* [Optional subscribe feature](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide#subscribe-to-a-search) to continuously monitor any search for new results
121117

122-
* Pipelining of [Processor](https://github.com/swirlai/swirl-search/wiki/3.-Developer-Guide#processors) stages for real-time adaptation and transformation of queries, responses and results
118+
* Pipelining of [Processor](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide#develop-new-processors) stages for real-time adaptation and transformation of queries, responses and results
123119

124-
* [Results stored](https://github.com/swirlai/swirl-search/wiki/3.-Developer-Guide#result-object) in SQLite3 or PostgreSQL for post-processing, consumption and/or analytics
120+
* [Results stored](https://github.com/swirlai/swirl-search/wiki/6.-Developer-Reference#result-objects) in SQLite3 or PostgreSQL for post-processing, consumption and/or analytics
125121

126-
* Built-in [Query Transformation](https://github.com/swirlai/swirl-search/wiki/3.-Developer-Guide#query-transformations) support, including re-writing and replacement
122+
* Built-in [Query Transformation](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide#using-query-transformations) support, including re-writing and replacement
127123

128-
* [Matching on word stems](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#relevancy) and [handling of stopword](https://github.com/swirlai/swirl-search/wiki/3.-Developer-Guide#stopwords-language) via NLTK
124+
* [Matching on word stems](https://github.com/swirlai/swirl-search/wiki/6.-Developer-Reference#cosinerelevancypostresultprocessor) and [handling of stopwords](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide#configure-stopwords-language) via NLTK
129125

130-
* [Duplicate detection](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#detecting-and-removing-duplicate-results) on field or by configurable Cosine Similarity threshold
126+
* [Duplicate detection](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide#detect-and-remove-duplicate-results) on field or by configurable Cosine Similarity threshold
131127

132-
* Re-ranking of unified results [using Cosine Vector Similarity](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#relevancy) based on [spaCy](https://spacy.io/)'s large language model and [NLTK](https://www.nltk.org/)
128+
* Re-ranking of unified results [using Cosine Vector Similarity](https://github.com/swirlai/swirl-search/wiki/6.-Developer-Reference#cosinerelevancypostresultprocessor) based on [spaCy](https://spacy.io/)'s large language model and [NLTK](https://www.nltk.org/)
133129

134-
* [Result mixers](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#result-mixers) order results by relevancy, date or round-robin (stack) format, with optional filtering of just new items in subscribe mode
130+
* [Result mixers](https://github.com/swirlai/swirl-search/wiki/6.-Developer-Reference#mixers-1) order results by relevancy, date or round-robin (stack) format, with optional filtering of just new items in subscribe mode
135131

136132
* Page through all results requested, re-run, re-score and update searches using URLs provided with each result set
137133

138134
* [Sample data sets](https://github.com/swirlai/swirl-search/tree/main/Data) for use with SQLite3 and PostgreSQL
139135

140-
* [Optional spell correction](https://github.com/swirlai/swirl-search/wiki/2.-User-Guide#spell-correction) using [TextBlob](https://textblob.readthedocs.io/en/dev/quickstart.html#spelling-correction)
136+
* [Optional spell correction](https://github.com/swirlai/swirl-search/wiki/5.-Developer-Guide#add-spelling-correction) using [TextBlob](https://textblob.readthedocs.io/en/dev/quickstart.html#spelling-correction)
141137

142-
* [Optional search/result expiration service](https://github.com/swirlai/swirl-search/wiki/4.-Admin-Guide#search-expiration-service) to limit storage use
138+
* [Optional search/result expiration service](https://github.com/swirlai/swirl-search/wiki/3.-Admin-Guide#search-expiration-service) to limit storage use
143139

144140
* Easily extensible [Connector](https://github.com/swirlai/swirl-search/tree/main/swirl/connectors) and [Mixer](https://github.com/swirlai/swirl-search/tree/main/swirl/mixers) objects
145141

146142
<br/>
147143

148144
# Support
149145

150-
* [Join Swirl Metasearch on Slack!](https://join.slack.com/t/swirlmetasearch/shared_invite/zt-1qk7q02eo-kpqFAbiZJGOdqgYVvR1sfw)
146+
* [Join the Swirl Metasearch Community on Slack!](https://join.slack.com/t/swirlmetasearch/shared_invite/zt-1qk7q02eo-kpqFAbiZJGOdqgYVvR1sfw)
151147

152-
* [Create an Issue](https://github.com/swirlai/swirl-search/issues) if something doesn't work, isn't clear, or should be documented
148+
* [Create a GitHub Issue](https://github.com/swirlai/swirl-search/issues) if something doesn't work, isn't clear, or should be documented
153149

154150
* Email: [[email protected]](mailto:[email protected]) with issues, requests, questions, etc - we'd love to hear from you!
155151

swirl/banner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ class bcolors:
1010
ENDC = '\033[0m'
1111
BOLD = '\033[1m'
1212

13-
SWIRL_VERSION = '2.0'
13+
SWIRL_VERSION = '2.0.2'
1414

15-
SWIRL_BANNER_TEXT = "__S_W_I_R_L__2_._0_._1__________________________________________________________"
15+
SWIRL_BANNER_TEXT = "__S_W_I_R_L__2_._0_._2__________________________________________________________"
1616
SWIRL_BANNER = f'{bcolors.BOLD}{SWIRL_BANNER_TEXT}{bcolors.ENDC}'
1717

1818
#############################################

swirl/connectors/requests.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,12 @@ def execute_search(self, session=None):
168168
}
169169
# response = requests.get(page_query, headers=headers)
170170
response = self.send_request(page_query, headers=headers, query=self.query_string_to_provider)
171+
elif self.provider.credentials.startswith('X-Api-Key='):
172+
headers = {
173+
"X-Api-Key": f"{self.provider.credentials.split('X-Api-Key=')[1]}"
174+
}
175+
logger.info(f"{self}: sending request with auth header X-Api-Key")
176+
response = self.send_request(page_query, headers=headers, query=self.query_string_to_provider)
171177
# all others
172178
else:
173179
# response = requests.get(page_query)

0 commit comments

Comments
 (0)