Skip to content

Full text search - #1180

Draft
FnayouSeif wants to merge 3 commits into
masterfrom
seif/search
Draft

FnayouSeif wants to merge 3 commits into
masterfrom
seif/search

Conversation

@FnayouSeif

Copy link
Copy Markdown
Contributor

This PR introduces a search functionality for organizations and projects.

The API endpoints expects a payload with search keywords. It returns the projects/ organizations that are relevant to the search. Each search result is give a "rank" or a score. Results with 0 or close to 0 ranks would be less relevant.

Example payload:
POST http://localhost:8000/api/cross_search
payload: {"text":"solar energy"}

Results:

{
    "projects": [
        {
            "name": "Collaborative online event : Calls For Climate - Solar Energy",
            "description": "Calls For Climate is an online series of events aiming to create new opportunities for collaboration among the climate action community. We dedicate this third episode to solar energy on the 2nd of December.",
            "url": "Collaborativeonlineevent:CallsForClimate-SolarEnergy128",
            "short": "Calls For Climate is an online series of events aiming to create new opportunities for collaboration among the climate action community. We dedicate this third episode to solar energy on the 2nd of December.",
            "rank": 0.520686
        },
        {
            "name": "Solar Energy and Liquified Petroleum Gas",
            "description": "Solar Energy, it is my desire to foot a solar power plant that will service quite a number of households jn my home area. \r\n\r\nLPG, we are currently distributing in two distinct communities servicing at least 100 households per day",
            "url": "SolarEnergyandLiquifiedPetroleumGas335",
            "short": "Solar Energy, it is my desire to foot a solar power plant that will service quite a number of households jn my home area. \r\n\r\nLPG, we are currently distributing in two distinct communities servicing at least 100 households per day",
            "rank": 0.314722
        },
        {
            "name": "Energy transition for everyone!",
            "description": "Golfstrom’s “Energiegemeinschaften” is an open and cooperative platform for energy communities. We build the crowd and network for local renewable energy communities laying the foundation for a decentralized platform-based energy system.",
            "url": "Energytransitionforeveryone!89",
            "short": "Golfstrom’s “Energiegemeinschaften” is an open and cooperative platform for energy communities. We build the crowd and network for local renewable energy communities laying the foundation for a decentralized platform-based energy system.",
            "rank": 0.239583
        },
        {
            "name": "The Moon and Earth Radiation Budget Experiment (MERBE)",
            "description": "Orbital measurements of the net solar energy entering Earth are critical for comparison and validation of computer model simulated climate signals run up to the present.  NASA CERES measurements used for these comparisons falsely indicate a drop in Earth global mean reflectivity.",
            "url": "TheMoonandEarthRadiationBudgetExperiment(MERBE)281",
            "short": "Orbital measurements of the net solar energy entering Earth are critical for comparison and validation of computer model simulated climate signals run up to the present.  NASA CERES measurements used for these comparisons falsely indicate a drop in Earth global mean reflectivity.",
            "rank": 0.201031
        },
        {
            "name": "Solar Energy",
            "description": "As the earth is warming we must unite and act to save the earth. Every home should have solar power so that we can reduce the heat. We can save this earth. This requires a comprehensive plan. Many SHGs are needed to implement this program together with the government and charitab",
            "url": "solar-energy",
            "short": "As the earth is warming we must unite and act to save the earth. Every home should have solar power so that we can reduce the heat. We can save this earth. This requires a comprehensive plan. Many SHGs are needed to implement this program together with the government and charitab",
            "rank": 0.1
        },
        {
            "name": "Making the planet cooler using mirrors",
            "description": "Here I explain my idea on how to solve global warming. This is not a permanent solution, but will give us more time, so our planet doesn't overheat before we find a solution that is more permanent. \r\n\r\nhttps://youtu.be/tdbjrxc-kpE",
            "url": "Makingtheplanetcoolerusingmirrors236",
            "short": "Here I explain my idea on how to solve global warming. This is not a permanent solution, but will give us more time, so our planet doesn't overheat before we find a solution that is more permanent. \r\n\r\nhttps://youtu.be/tdbjrxc-kpE",
            "rank": 0.1
        },
        {
            "name": "Smart Reflectors",
            "description": "If we are to fix climate change we must first affordably harness the sun's energy. We have applied IoT technology to solar reflectors so now renewable energy cost's way less than fossil fuels. They can heat your home for less, while topping up your solar panels and your tan :D",
            "url": "SmartReflectors310",
            "short": "If we are to fix climate change we must first affordably harness the sun's energy. We have applied IoT technology to solar reflectors so now renewable energy cost's way less than fossil fuels. They can heat your home for less, while topping up your solar panels and your tan :D",
            "rank": 0.0434504
        },
        {
            "name": "designing solar wind hybrid power supply for south sudan",
            "description": "ABSTRACT: The demand for electricity power is increasing day by day, which cannot be met with the satisfied level without non-renewable energy resource. Renewable energy sources such as wind, solar are universal and ecological.",
            "url": "designingsolarwindhybridpowersupplyforsouthsudan196",
            "short": "ABSTRACT: The demand for electricity power is increasing day by day, which cannot be met with the satisfied level without non-renewable energy resource. Renewable energy sources such as wind, solar are universal and ecological.",
            "rank": 0.02
        },
    ],
    "organizations": [
        {
            "name": "Omaguaco",
            "short_description": "",
            "website": "https://omaguaco.blogspot.com/p/replica.html",
            "about": "Our undertaking's mission is to rescue the discarded harvest, revalue Andean agro-food processed with solar energy, achieving a sustainable impact on the environmental and economic development of northwestern Argentina, solving the gastronomic needs of the population and generating employment opportunities and social inclusion young people who fight against uprooting, marginalization and the loss of cultural values.",
            "url": "Omaguaco72",
            "rank": 0.1
        },
        {
            "name": "MAJEC Energy",
            "short_description": "",
            "website": "",
            "about": "MAJEC energy is a solar and renewable energy organisation with operational offices in Nigeria.\nMAJEC ENERGY, we design and integrate solar and power backup solution cutting across all energy requirements and environmental conservation and energy consultant services.",
            "url": "MAJECEnergy183",
            "rank": 0.0991667
        },
        {
            "name": "Golfstrom Energy GmbH",
            "short_description": "Golfstrom ist das Social Business hinter den “Energiegemeinschaften”, einer offenen und kooperativen Plattform für die Solar-Energiewende vor Ort.",
            "website": "https://www.golfstrom.org",
            "about": "Golfstrom ist das Social Business hinter den “Energiegemeinschaften”, einer offenen und kooperativen Plattform für die Solar-Energiewende vor Ort. Wir bauen die Crowd und das Netzwerk für lokale Erneuerbare Energien Gemeinschaften als Ausgangspunkt für eine zukünftige, plattform-basierte Energieversorgung. Die Plattform ermöglicht die Miete von Solaranlagen und niederschwellige Crowdinvestments in Projekte deiner Region und steht privaten wie auch öffentlichen Organisationen offen.",
            "url": "GolfstromCommunity45",
            "rank": 0.00763889
        },
        {
            "name": "Kalender Kollektiv",
            "short_description": "We are a collective that creates a pocket calendar for climate activists. It contains information on climate justice, tips to organize your daily life, how to improve meetings, etc.",
            "website": "",
            "about": "",
            "url": "kalender-kollektiv",
            "rank": 0.0
        },
        {
            "name": "Die rote Zora",
            "short_description": "Die rote Zora ist ein Modelabel mit Weltverbesserungsanspruch. Produziert wird ausschließlich in Deutschland.\nFokus ist der rote Zora Stil mit Retrotouch und  dem Ziel die umfangreiche Kollektion in der gesamten Produktionskette biofair zu gestalten. ",
            "website": "www.dierotezora.com",
            "about": "We are a fashion label from Stuttgart creating slow fashion since 2009. With our products we aim to make the world a better place.\t\nFair distribution of added value along the entire production chain is important to us.\nNo exploitation of producers and the environment, sustainable and  economically viable business relationships including organic and fair materials and our transparant production in Germany.\nOur team ensures that ideas, design and production all happen under one roof.\n\nThis way can meet your individual requests and you will receive quality craftsmenship made in Germany.",
            "url": "DieroteZora192",
            "rank": 0.0
        },
        {
            "name": "Climate Connect",
            "short_description": "Climate Connect connects climate activists worldwide and locally, online and offline. Always with the motto: \"Believe in together\".",
            "website": "climateconnect.earth",
            "about": "The idea of Climate Connect was born after a local networking event in Chris and Tobi's home town Erlangen, Germany. After the event, it was very obvious that not a lot of people knew each other or had worked together before. The idea was born to bring this approach to a global level and to include as many people as possible to fight climate change together.\nSince then we have been working on our free, non-profit climate action network. 100% Independent.\nA network for everyone who contributes or wants to contribute to solving the climate crisis. We are enabling global and local collaboration and knowledge sharing in climate action.",
            "url": "ClimateConnect1",
            "rank": 0.0
        },
        {
            "name": "Stadt Erlangen",
            "short_description": "Im Mai 2019 hat Erlangen als erste Kommune in Bayern den Klimanotstand ausgerufen. Damit bekennt sich die Stadt zu dem 1,5°C Ziel und erkennt die Eindämmung des Klimawandels und seiner schwerwiegenden Folgen als Aufgabe von höchster Priorität an.",
            "website": "erlangen.de",
            "about": "",
            "url": "StadtErlangen165",
            "rank": 0.0
        }
    ]
}``` 

@phiresky

Copy link
Copy Markdown
Contributor

relevant issue: #1119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants